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 ebfe635a8d4569882a55c6c28509b3391b5650c5..9029acbcbec3d3c60e7a77459e3cf12a8fabb1d0 100644 |
| --- a/chrome/browser/profiles/profile_manager.cc |
| +++ b/chrome/browser/profiles/profile_manager.cc |
| @@ -1108,22 +1108,22 @@ void ProfileManager::AddProfileToCache(Profile* profile) { |
| void ProfileManager::SetGuestProfilePrefs(Profile* profile) { |
| IncognitoModePrefs::SetAvailability(profile->GetPrefs(), |
| - IncognitoModePrefs::FORCED); |
| + IncognitoModePrefs::ENABLED); |
|
noms (inactive)
2014/02/14 19:28:10
I think this is the default behaviour, so you don'
bcwhite
2014/02/14 19:46:36
It has to be present to switch existing Guest prof
|
| profile->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, false); |
|
noms (inactive)
2014/02/14 19:28:10
Is this still needed? At the moment you can bring
bcwhite
2014/02/14 19:46:36
Done.
|
| } |
| bool ProfileManager::ShouldGoOffTheRecord(Profile* profile) { |
| - bool go_off_the_record = false; |
| + if (profile->IsGuestSession()) |
| + return true; |
| #if defined(OS_CHROMEOS) |
| const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| - if (command_line.HasSwitch(chromeos::switches::kGuestSession) || |
| - (profile->GetPath().BaseName().value() == chrome::kInitialProfile && |
| - (!command_line.HasSwitch(switches::kTestType) || |
| - command_line.HasSwitch(chromeos::switches::kLoginProfile)))) { |
| - go_off_the_record = true; |
| + if (profile->GetPath().BaseName().value() == chrome::kInitialProfile && |
| + (!command_line.HasSwitch(switches::kTestType) || |
| + command_line.HasSwitch(chromeos::switches::kLoginProfile))) { |
| + return true; |
| } |
| #endif |
| - return go_off_the_record; |
| + return false; |
|
noms (inactive)
2014/02/14 19:28:10
If you move the ifdef to the top, you can just ret
bcwhite
2014/02/14 19:46:36
Could... but I think the style of testing various
|
| } |
| void ProfileManager::RunCallbacks(const std::vector<CreateCallback>& callbacks, |