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

Unified Diff: chrome/browser/chromeos/login/user_manager_impl.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: fix ProfileManagerTest,InputMethodPersistenceTest 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
Index: chrome/browser/chromeos/login/user_manager_impl.cc
diff --git a/chrome/browser/chromeos/login/user_manager_impl.cc b/chrome/browser/chromeos/login/user_manager_impl.cc
index ddbbb2afb731ba426001f36eaac0eae83ab26862..05c356302ca644e223ba4eb6fc23848351f65007 100644
--- a/chrome/browser/chromeos/login/user_manager_impl.cc
+++ b/chrome/browser/chromeos/login/user_manager_impl.cc
@@ -1641,6 +1641,7 @@ base::FilePath UserManagerImpl::GetUserProfileDir(
const std::string& email) const {
// TODO(dpolukhin): Remove Chrome OS specific profile path logic from
// ProfileManager and use only this function to construct profile path.
+ // TODO(nkostylev): Cleanup profile dir related code paths crbug.com/294233
base::FilePath profile_dir;
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(::switches::kMultiProfiles)) {
@@ -1650,8 +1651,15 @@ base::FilePath UserManagerImpl::GetUserProfileDir(
chrome::kProfileDirPrefix + user->username_hash());
}
} else if (command_line.HasSwitch(chromeos::switches::kLoginProfile)) {
- profile_dir = command_line.GetSwitchValuePath(
- chromeos::switches::kLoginProfile);
+ 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 = base::FilePath(
+ chrome::kProfileDirPrefix + login_profile_value);
+ }
} else {
// We should never be logged in with no profile dir unless
// multi-profiles are enabled.

Powered by Google App Engine
This is Rietveld 408576698