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

Unified Diff: chrome/browser/ui/browser_init.cc

Issue 7562009: Print an error when trying to launch an incognito browser and incognito is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698