Chromium Code Reviews| Index: chrome/browser/ui/browser_init.cc |
| diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc |
| index 7fa78c301801e0bd9155bd4dcc58e89e18db4115..8d131ebc57b91234ccb3846a129949c1944e65a3 100644 |
| --- a/chrome/browser/ui/browser_init.cc |
| +++ b/chrome/browser/ui/browser_init.cc |
| @@ -539,9 +539,13 @@ bool BrowserInit::LaunchBrowser(const CommandLine& command_line, |
| // Continue with the incognito profile from here on if --incognito |
| if ((command_line.HasSwitch(switches::kIncognito) || |
| - profile->GetPrefs()->GetBoolean(prefs::kIncognitoForced)) && |
| - profile->GetPrefs()->GetBoolean(prefs::kIncognitoEnabled)) { |
| - profile = profile->GetOffTheRecordProfile(); |
| + profile->GetPrefs()->GetBoolean(prefs::kIncognitoForced))) { |
| + if (profile->GetPrefs()->GetBoolean(prefs::kIncognitoEnabled)) { |
| + profile = profile->GetOffTheRecordProfile(); |
| + } else { |
| + LOG(ERROR) << "Incognito mode disabled by policy, launching a normal " |
|
sky
2011/08/08 14:01:50
At best this should be a warning, not an error.
Joao da Silva
2011/08/08 17:34:40
Done.
|
| + << "browser session."; |
| + } |
| } |
| BrowserInit::LaunchWithProfile lwp(cur_dir, command_line, this); |