diff options
Diffstat (limited to 'devel/electron32/files/patch-chrome_browser_profiles_profile__impl.cc')
-rw-r--r-- | devel/electron32/files/patch-chrome_browser_profiles_profile__impl.cc | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/devel/electron32/files/patch-chrome_browser_profiles_profile__impl.cc b/devel/electron32/files/patch-chrome_browser_profiles_profile__impl.cc deleted file mode 100644 index 3b18c17f5fc8..000000000000 --- a/devel/electron32/files/patch-chrome_browser_profiles_profile__impl.cc +++ /dev/null @@ -1,40 +0,0 @@ ---- chrome/browser/profiles/profile_impl.cc.orig 2024-08-14 20:54:36 UTC -+++ chrome/browser/profiles/profile_impl.cc -@@ -266,6 +266,10 @@ - #include "chrome/browser/spellchecker/spellcheck_service.h" - #endif - -+#if BUILDFLAG(IS_BSD) -+#include "sandbox/policy/sandbox.h" -+#endif -+ - using bookmarks::BookmarkModel; - using content::BrowserThread; - using content::DownloadManagerDelegate; -@@ -600,7 +604,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async - #else - { - #endif // BUILDFLAG(IS_CHROMEOS_LACROS) --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - ProfileManager* profile_manager = g_browser_process->profile_manager(); - ProfileAttributesEntry* entry = - profile_manager->GetProfileAttributesStorage() -@@ -901,7 +905,17 @@ base::FilePath ProfileImpl::last_selected_directory() - } - - base::FilePath ProfileImpl::last_selected_directory() { -+#if BUILDFLAG(IS_OPENBSD) -+ // If unveil(2) is used, force the file dialog directory to something we -+ // know is available. -+ auto* sandbox = sandbox::policy::SandboxLinux::GetInstance(); -+ if (sandbox->unveil_initialized()) -+ return GetPrefs()->GetFilePath(prefs::kDownloadDefaultDirectory); -+ else -+ return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); -+#else - return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); -+#endif - } - - void ProfileImpl::set_last_selected_directory(const base::FilePath& path) { |