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

Unified Diff: chrome/browser/extensions/extension_tabs_module.cc

Issue 7520023: Converted IncognitoForced boolean policy into IncognitoModeAvailability enum policy. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
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
Index: chrome/browser/extensions/extension_tabs_module.cc
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index f7d2deac5dd3bc254f9a70a8cbcdc357f15d0984..554a463d9ed358d86d9a09dae9f093968a16f06f 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_tabs_module_constants.h"
#include "chrome/browser/net/url_fixer_upper.h"
+#include "chrome/browser/prefs/incognito_mode_availability_prefs.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/restore_tab_helper.h"
#include "chrome/browser/tabs/tab_strip_model.h"
@@ -527,7 +528,8 @@ bool CreateWindowFunction::RunImpl() {
if (args->HasKey(keys::kIncognitoKey)) {
EXTENSION_FUNCTION_VALIDATE(args->GetBoolean(keys::kIncognitoKey,
&incognito));
- if (!profile_->GetPrefs()->GetBoolean(prefs::kIncognitoEnabled)) {
+ if (profile_->GetPrefs()->GetInteger(prefs::kIncognitoModeAvailability) ==
+ IncognitoModeAvailabilityPrefs::DISABLED) {
error_ = keys::kIncognitoModeIsDisabled;
return false;
}

Powered by Google App Engine
This is Rietveld 408576698