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

Unified Diff: chrome/app/chrome_main_delegate.cc

Issue 200473002: Move all callers of GetHomeDir() to PathService::Get(base::DIR_HOME). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move subprocess homedir override to ChromeContentBrowserClient/ChromeMainDelegate Created 6 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
Index: chrome/app/chrome_main_delegate.cc
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index ef955cfa0aa811e9d4dd78dbedf9257b244f1c17..43dafc110347e2d510bd6abfd86f9f6c0bd1065f 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -4,6 +4,7 @@
#include "chrome/app/chrome_main_delegate.h"
+#include "base/base_paths.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/i18n/rtl.h"
@@ -475,6 +476,15 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exit_code) {
#endif
#if defined(OS_CHROMEOS)
+ // Initialize primary user homedir (in multi-profile session) as it may be
+ // passed as a command line switch.
+ base::FilePath homedir;
+ if (command_line.HasSwitch(chromeos::switches::kHomedir)) {
+ homedir = base::FilePath(
+ command_line.GetSwitchValueASCII(chromeos::switches::kHomedir));
+ PathService::OverrideAndCreateIfNeeded(base::DIR_HOME, homedir, false);
+ }
+
// If we are recovering from a crash on ChromeOS, then we will do some
// recovery using the diagnostics module, and then continue on. We fake up a
// command line to tell it that we want it to recover, and to preserve the

Powered by Google App Engine
This is Rietveld 408576698