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

Unified Diff: chrome/renderer/content_settings_observer.h

Issue 8775005: Content settings: whitelist kExtensionScheme and kChromeInternalScheme on the renderer side. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review. Created 9 years, 1 month 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/chrome_tests.gypi ('k') | chrome/renderer/content_settings_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/content_settings_observer.h
diff --git a/chrome/renderer/content_settings_observer.h b/chrome/renderer/content_settings_observer.h
index a76e71cc226b8dfa2efa6b30e2f50d14192549ca..027867cad6727f0f9cb8a8792e75eaf81c439dfc 100644
--- a/chrome/renderer/content_settings_observer.h
+++ b/chrome/renderer/content_settings_observer.h
@@ -66,6 +66,8 @@ class ContentSettingsObserver
void DidNotAllowScript(WebKit::WebFrame* frame);
private:
+ FRIEND_TEST_ALL_PREFIXES(ContentSettingsObserverTest, WhitelistedSchemes);
+
// RenderViewObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame,
@@ -77,6 +79,13 @@ class ContentSettingsObserver
// Resets the |content_blocked_| array.
void ClearBlockedContentSettings();
+ // Helpers.
+ // True if |frame| contains content that is white-listed for content settings.
+ static bool IsWhitelistedForContentSettings(WebKit::WebFrame* frame);
+ static bool IsWhitelistedForContentSettings(
+ const WebKit::WebSecurityOrigin& origin,
+ const GURL& document_url);
+
// A pointer to content setting rules stored by the renderer. Normally, the
// |RendererContentSettingRules| object is owned by
// |ChromeRenderProcessObserver|. In the tests it is owned by the caller of
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/renderer/content_settings_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698