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..5bb0c589d75bf5cd96ce92b0902a10df317433ca 100644 |
| --- a/chrome/browser/profiles/profile_manager.cc |
| +++ b/chrome/browser/profiles/profile_manager.cc |
| @@ -1107,23 +1107,25 @@ void ProfileManager::AddProfileToCache(Profile* profile) { |
| } |
| void ProfileManager::SetGuestProfilePrefs(Profile* profile) { |
| + // This can be removed in the future but needs to be present through |
| + // a release (or two) so that any existing installs get switched to |
| + // the new state and away from the previous "forced" state. |
| IncognitoModePrefs::SetAvailability(profile->GetPrefs(), |
| - IncognitoModePrefs::FORCED); |
| - profile->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, false); |
| + IncognitoModePrefs::ENABLED); |
| } |
| bool ProfileManager::ShouldGoOffTheRecord(Profile* profile) { |
| - bool go_off_the_record = false; |
| + if (profile->IsGuestSession()) |
|
msw
2014/02/15 00:30:52
nit: if the order of checks between this and the C
bcwhite
2014/02/18 15:19:36
Done.
|
| + 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; |
| } |
| void ProfileManager::RunCallbacks(const std::vector<CreateCallback>& callbacks, |