summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc2
-rw-r--r--chrome/common/chrome_switches.cc4
-rw-r--r--chrome/common/chrome_switches.h2
-rw-r--r--chrome/common/render_messages.h4
4 files changed, 11 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index f8d20a3..0395ab1 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -168,6 +168,8 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
command_line.HasSwitch(switches::kEnableFastback);
web_prefs.remote_fonts_enabled =
command_line.HasSwitch(switches::kEnableRemoteFonts);
+ web_prefs.xss_auditor_enabled =
+ command_line.HasSwitch(switches::kEnableXSSAuditor);
}
web_prefs.uses_universal_detector =
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 5e739d6..7fd2d38 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -526,4 +526,8 @@ const wchar_t kFileDescriptorLimit[] = L"file-descriptor-limit";
// to be sRGB.
const wchar_t kEnableMonitorProfile[] = L"enable-monitor-profile";
+// Enable WebKit's XSSAuditor to mitigate reflective XSS. The XSSAuditor is
+// still experimental.
+const wchar_t kEnableXSSAuditor[] = L"enable-xss-auditor";
+
} // namespace switches
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index cd479af..bbebd74 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -200,6 +200,8 @@ extern const wchar_t kFileDescriptorLimit[];
extern const wchar_t kEnableMonitorProfile[];
+extern const wchar_t kEnableXSSAuditor[];
+
} // namespace switches
#endif // CHROME_COMMON_CHROME_SWITCHES_H_
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index fd3e5eb..cd62ed1 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -1555,6 +1555,7 @@ struct ParamTraits<WebPreferences> {
WriteParam(m, p.user_style_sheet_location);
WriteParam(m, p.uses_page_cache);
WriteParam(m, p.remote_fonts_enabled);
+ WriteParam(m, p.xss_auditor_enabled);
}
static bool Read(const Message* m, void** iter, param_type* p) {
return
@@ -1584,7 +1585,8 @@ struct ParamTraits<WebPreferences> {
ReadParam(m, iter, &p->user_style_sheet_enabled) &&
ReadParam(m, iter, &p->user_style_sheet_location) &&
ReadParam(m, iter, &p->uses_page_cache) &&
- ReadParam(m, iter, &p->remote_fonts_enabled);
+ ReadParam(m, iter, &p->remote_fonts_enabled) &&
+ ReadParam(m, iter, &p->xss_auditor_enabled);
}
static void Log(const param_type& p, std::wstring* l) {
l->append(L"<WebPreferences>");