Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: chrome/app/chrome_main_delegate.cc

Issue 10306009: Make sure only the main browser process and service proceses are allowed to create the profile dire… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add gpu to the list of allowed processes. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/path_service.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main_delegate.cc
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index f1d4fde1874b6a6b8bdc633a4ab4813bbdc8b94e..063c156b77be7c9d50d604fc94f4ba26ce9c2287 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -567,8 +567,12 @@ void ChromeMainDelegate::PreSandboxStartup() {
#if defined(OS_MACOSX) || defined(OS_WIN)
CheckUserDataDirPolicy(&user_data_dir);
#endif
- if (!user_data_dir.empty())
- CHECK(PathService::Override(chrome::DIR_USER_DATA, user_data_dir));
+ if (!user_data_dir.empty()) {
+ CHECK(PathService::OverrideAndCreateIfNeeded(
+ chrome::DIR_USER_DATA,
+ user_data_dir,
+ chrome::ProcessNeedsProfileDir(process_type)));
+ }
startup_timer_.reset(new base::StatsScope<base::StatsCounterTimer>
(content::Counters::chrome_main()));
« no previous file with comments | « base/path_service.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698