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

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

Issue 9264071: Add per-tab XSSAuditorEnabled setting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « no previous file | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/prefs/prefs_tab_helper.cc
diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/prefs/prefs_tab_helper.cc
index dd9cd016d18babce79b77ce8f43555eb68e34998..f61fb4b194e60db44d44712c01e0520dd3a72d70 100644
--- a/chrome/browser/ui/prefs/prefs_tab_helper.cc
+++ b/chrome/browser/ui/prefs/prefs_tab_helper.cc
@@ -46,7 +46,8 @@ const char* kPerTabPrefsToObserve[] = {
prefs::kWebKitDefaultFontSize,
prefs::kWebKitDefaultFixedFontSize,
prefs::kWebKitMinimumFontSize,
- prefs::kWebKitMinimumLogicalFontSize
+ prefs::kWebKitMinimumLogicalFontSize,
+ prefs::kWebKitXSSAuditorEnabled
};
const int kPerTabPrefsToObserveLength = arraysize(kPerTabPrefsToObserve);
@@ -108,6 +109,9 @@ static void RegisterPerTabUserPrefs(PrefService* prefs) {
prefs->RegisterBooleanPref(prefs::kWebKitPluginsEnabled,
pref_defaults.plugins_enabled,
PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterBooleanPref(prefs::kWebKitXSSAuditorEnabled,
+ pref_defaults.xss_auditor_enabled,
+ PrefService::UNSYNCABLE_PREF);
RegisterFontsAndCharsetPrefs(prefs);
}
@@ -434,6 +438,8 @@ void PrefsTabHelper::InitPerTabUserPrefStore(
pref_store->RegisterOverlayPref(
prefs::kWebKitMinimumLogicalFontSize,
prefs::kWebKitGlobalMinimumLogicalFontSize);
+ pref_store->RegisterOverlayPref(
+ prefs::kWebKitXSSAuditorEnabled);
}
// static
@@ -641,6 +647,8 @@ void PrefsTabHelper::UpdateWebPreferences() {
per_tab_prefs_->GetInteger(prefs::kWebKitMinimumFontSize);
prefs.minimum_logical_font_size =
per_tab_prefs_->GetInteger(prefs::kWebKitMinimumLogicalFontSize);
+ prefs.xss_auditor_enabled =
+ per_tab_prefs_->GetBoolean(prefs::kWebKitXSSAuditorEnabled);
prefs.default_encoding =
per_tab_prefs_->GetString(prefs::kDefaultCharset);
« no previous file with comments | « no previous file | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698