summaryrefslogtreecommitdiff
path: root/www/chromium/patches/patch-chrome_browser_profiles_profile_impl_cc
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium/patches/patch-chrome_browser_profiles_profile_impl_cc')
-rw-r--r--www/chromium/patches/patch-chrome_browser_profiles_profile_impl_cc32
1 files changed, 0 insertions, 32 deletions
diff --git a/www/chromium/patches/patch-chrome_browser_profiles_profile_impl_cc b/www/chromium/patches/patch-chrome_browser_profiles_profile_impl_cc
deleted file mode 100644
index c0a2f4a..0000000
--- a/www/chromium/patches/patch-chrome_browser_profiles_profile_impl_cc
+++ /dev/null
@@ -1,32 +0,0 @@
1Index: chrome/browser/profiles/profile_impl.cc
2--- chrome/browser/profiles/profile_impl.cc.orig
3+++ chrome/browser/profiles/profile_impl.cc
4@@ -263,6 +263,10 @@
5 #include "chrome/browser/spellchecker/spellcheck_service.h"
6 #endif
7
8+#if BUILDFLAG(IS_OPENBSD)
9+#include "sandbox/policy/openbsd/sandbox_openbsd.h"
10+#endif
11+
12 using bookmarks::BookmarkModel;
13 using content::BrowserThread;
14 using content::DownloadManagerDelegate;
15@@ -848,7 +852,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode)
16 }
17
18 base::FilePath ProfileImpl::last_selected_directory() {
19+#if BUILDFLAG(IS_OPENBSD)
20+ // If unveil(2) is used, force the file dialog directory to something we
21+ // know is available.
22+ auto* sandbox = sandbox::policy::SandboxLinux::GetInstance();
23+ if (sandbox->unveil_initialized())
24+ return GetPrefs()->GetFilePath(prefs::kDownloadDefaultDirectory);
25+ else
26+ return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory);
27+#else
28 return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory);
29+#endif
30 }
31
32 void ProfileImpl::set_last_selected_directory(const base::FilePath& path) {