Chromium Code Reviews| Index: chrome/browser/profiles/profile_manager.cc |
| diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc |
| index 4b0fee380037fffbac5d77794a9e4d4504e01794..dd76d345adc7f4b77eebb58f886b4ec4fc2dd7b7 100644 |
| --- a/chrome/browser/profiles/profile_manager.cc |
| +++ b/chrome/browser/profiles/profile_manager.cc |
| @@ -460,35 +460,14 @@ bool ProfileManager::IsValidProfile(Profile* profile) { |
| } |
| base::FilePath ProfileManager::GetInitialProfileDir() { |
| - base::FilePath relative_profile_dir; |
| #if defined(OS_CHROMEOS) |
| - const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| if (logged_in_) { |
|
Mr4D (OOO till 08-26)
2014/08/15 14:27:56
I was wondering about guest mode. Looking at the G
dzhioev (left Google)
2014/08/15 16:11:25
Yep, guest mode still works. Guest mode starts in
|
| - base::FilePath profile_dir; |
| - // If the user has logged in, pick up the new profile. |
| - if (command_line.HasSwitch(chromeos::switches::kLoginProfile)) { |
| - // TODO(nkostylev): Remove this code completely once we eliminate |
| - // legacy --login-profile=user switch and enable multi-profiles on CrOS |
| - // by default. http://crbug.com/294628 |
| - profile_dir = chromeos::ProfileHelper:: |
| - GetProfileDirByLegacyLoginProfileSwitch(); |
| - } |
| - // In case of multi-profiles ignore --login-profile switch. |
| - // TODO(nkostylev): Some cases like Guest mode will have empty username_hash |
| - // so default kLoginProfile dir will be used. |
| - std::string user_id_hash = |
| - chromeos::ProfileHelper::Get()->active_user_id_hash(); |
| - if (!user_id_hash.empty()) |
| - profile_dir = chromeos::ProfileHelper::Get()->GetActiveUserProfileDir(); |
| - |
| - relative_profile_dir = relative_profile_dir.Append(profile_dir); |
| - return relative_profile_dir; |
| + return chromeos::ProfileHelper::Get()->GetActiveUserProfileDir(); |
| } |
| #endif |
| + base::FilePath relative_profile_dir; |
| // TODO(mirandac): should not automatically be default profile. |
| - relative_profile_dir = |
| - relative_profile_dir.AppendASCII(chrome::kInitialProfile); |
| - return relative_profile_dir; |
| + return relative_profile_dir.AppendASCII(chrome::kInitialProfile); |
| } |
| Profile* ProfileManager::GetLastUsedProfile( |
| @@ -1204,10 +1183,7 @@ void ProfileManager::SetGuestProfilePrefs(Profile* profile) { |
| bool ProfileManager::ShouldGoOffTheRecord(Profile* profile) { |
| #if defined(OS_CHROMEOS) |
| - const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| - if (profile->GetPath().BaseName().value() == chrome::kInitialProfile && |
| - (!command_line.HasSwitch(switches::kTestType) || |
| - command_line.HasSwitch(chromeos::switches::kLoginProfile))) { |
| + if (profile->GetPath().BaseName().value() == chrome::kInitialProfile) { |
| return true; |
| } |
| #endif |