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

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 23967015: Use multi-profile mount point by default after browser crash and in Guest session. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: handle test-user profile as well Created 7 years, 3 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 | « chrome/browser/chromeos/profiles/profile_helper.cc ('k') | chrome/common/chrome_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 87cb3dc6a496111e72062a329d1d2cf8964bfdbe..4a8c33a243cf840581736bce517f80c3c94a6d88 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -316,8 +316,18 @@ base::FilePath ProfileManager::GetInitialProfileDir() {
base::FilePath profile_dir;
// If the user has logged in, pick up the new profile.
if (command_line.HasSwitch(chromeos::switches::kLoginProfile)) {
- profile_dir = command_line.GetSwitchValuePath(
- chromeos::switches::kLoginProfile);
+ // TODO(nkostylev): Remove this code completely once we eliminate
+ // legacy --login-profile=user switch and enable multi-profiles on CrOS
sail 2013/09/18 18:17:20 Normally we also include a bug number for these ty
Nikita (slow) 2013/09/19 08:17:35 Done.
+ // by default.
+ std::string login_profile_value =
+ command_line.GetSwitchValueASCII(chromeos::switches::kLoginProfile);
+ if (login_profile_value == chrome::kLegacyProfileDir ||
+ login_profile_value == chrome::kTestUserProfileDir) {
+ profile_dir = base::FilePath(login_profile_value);
+ } else {
+ profile_dir = g_browser_process->platform_part()->profile_helper()->
+ GetUserProfileDir(login_profile_value);
+ }
} else if (!command_line.HasSwitch(switches::kMultiProfiles)) {
// We should never be logged in with no profile dir unless
// multi-profiles are enabled.
« no previous file with comments | « chrome/browser/chromeos/profiles/profile_helper.cc ('k') | chrome/common/chrome_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698