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

Unified Diff: content/public/browser/url_data_source.h

Issue 2003963004: Enable CSP on more WebUI pages (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: fix new tab Created 4 years, 7 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: content/public/browser/url_data_source.h
diff --git a/content/public/browser/url_data_source.h b/content/public/browser/url_data_source.h
index 565b0ff291a3f99866e271b4ed46028910622a19..bc11ba994941cdbbb86f5867c209c07506beeea2 100644
--- a/content/public/browser/url_data_source.h
+++ b/content/public/browser/url_data_source.h
@@ -98,6 +98,9 @@ class CONTENT_EXPORT URLDataSource {
// It is OK to override the following two methods to a custom CSP directive
Avi (use Gerrit) 2016/05/24 23:15:07 three methods?
wychen 2016/05/25 12:55:08 Reordered.
// thereby slightly reducing the protection applied to the page.
+ // By default, "scrip-src chrome://resources 'self' 'unsafe-eval';" is added
Avi (use Gerrit) 2016/05/24 23:15:07 scrip -> script ?
wychen 2016/05/25 12:55:08 *shame cube* Thanks!
+ // to CSP. Override to change this.
+ virtual std::string GetContentSecurityPolicyScriptSrc() const;
// By default, "object-src 'none';" is added to CSP. Override to change this.
virtual std::string GetContentSecurityPolicyObjectSrc() const;
// By default, "frame-src 'none';" is added to CSP. Override to change this.

Powered by Google App Engine
This is Rietveld 408576698