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

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

Issue 6399001: Revert 72624 (due to crashes) - Implement pref policy for disabling incognito... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
===================================================================
--- chrome/browser/ui/browser.cc (revision 72629)
+++ chrome/browser/ui/browser.cc (working copy)
@@ -223,8 +223,6 @@
printing_enabled_.Init(prefs::kPrintingEnabled, local_state, this);
dev_tools_disabled_.Init(prefs::kDevToolsDisabled,
profile_->GetPrefs(), this);
- incognito_mode_allowed_.Init(prefs::kIncognitoEnabled,
- profile_->GetPrefs(), this);
InitCommandState();
BrowserList::AddBrowser(this);
@@ -1307,8 +1305,7 @@
void Browser::NewWindow() {
if (browser_defaults::kAlwaysOpenIncognitoWindow &&
- CommandLine::ForCurrentProcess()->HasSwitch(switches::kIncognito) &&
- incognito_mode_allowed_.GetValue()) {
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kIncognito)) {
NewIncognitoWindow();
return;
}
@@ -1322,11 +1319,6 @@
}
void Browser::NewIncognitoWindow() {
- if (!incognito_mode_allowed_.GetValue()) {
- NewWindow();
- return;
- }
-
UserMetrics::RecordAction(UserMetricsAction("NewIncognitoWindow"), profile_);
Browser::OpenEmptyWindow(profile_->GetOffTheRecordProfile());
}
@@ -1950,7 +1942,7 @@
switches::kDisableTabbedOptions)) {
ShowOptionsTab(chrome::kLanguageOptionsSubPage);
} else {
- // Language options dialog has been replaced by DOMUI.
+ // Language options dialog has been replaced by DOMUI.
}
}
@@ -2046,7 +2038,6 @@
prefs->RegisterBooleanPref(prefs::kRemotingHasSetupCompleted, false);
prefs->RegisterStringPref(prefs::kCloudPrintEmail, std::string());
prefs->RegisterBooleanPref(prefs::kDevToolsDisabled, false);
- prefs->RegisterBooleanPref(prefs::kIncognitoEnabled, true);
prefs->RegisterRealPref(prefs::kDefaultZoomLevel, 0.0);
prefs->RegisterIntegerPref(prefs::kMultipleProfilePrefMigration, 0);
// We need to register the type of this preference in order to query
@@ -3450,8 +3441,7 @@
// Window management commands
command_updater_.UpdateCommandEnabled(IDC_NEW_WINDOW, true);
- command_updater_.UpdateCommandEnabled(IDC_NEW_INCOGNITO_WINDOW,
- incognito_mode_allowed_.GetValue());
+ command_updater_.UpdateCommandEnabled(IDC_NEW_INCOGNITO_WINDOW, true);
command_updater_.UpdateCommandEnabled(IDC_CLOSE_WINDOW, true);
command_updater_.UpdateCommandEnabled(IDC_NEW_TAB, true);
command_updater_.UpdateCommandEnabled(IDC_CLOSE_TAB, true);
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698