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

Unified Diff: chrome/renderer/content_settings_observer.h

Issue 797993002: Remove kInstantProcess from renderer ContentSettingsObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 6 years 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/renderer/chrome_content_renderer_client.cc ('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 b6f13b653fbbb3ef892b379b934d4710523e6c6b..9622d7ed7c7d3037d9611995e36a07a41e72b39f 100644
--- a/chrome/renderer/content_settings_observer.h
+++ b/chrome/renderer/content_settings_observer.h
@@ -33,8 +33,11 @@ class ContentSettingsObserver
public content::RenderFrameObserverTracker<ContentSettingsObserver>,
public blink::WebPermissionClient {
public:
+ // Set |should_whitelist| to true if |render_frame()| contains content that
+ // should be whitelisted for content settings.
ContentSettingsObserver(content::RenderFrame* render_frame,
- extensions::Dispatcher* extension_dispatcher);
+ extensions::Dispatcher* extension_dispatcher,
+ bool should_whitelist);
~ContentSettingsObserver() override;
// Sets the content setting rules which back |AllowImage()|, |AllowScript()|,
@@ -119,8 +122,9 @@ class ContentSettingsObserver
#endif
// Helpers.
- // True if |frame| contains content that is white-listed for content settings.
- static bool IsWhitelistedForContentSettings(content::RenderFrame* frame);
+ // True if |render_frame()| contains content that is white-listed for content
+ // settings.
+ bool IsWhitelistedForContentSettings() const;
static bool IsWhitelistedForContentSettings(
const blink::WebSecurityOrigin& origin,
const GURL& document_url);
@@ -158,6 +162,9 @@ class ContentSettingsObserver
typedef std::map<int, blink::WebPermissionCallbacks> PermissionRequestMap;
PermissionRequestMap permission_requests_;
+ // If true, IsWhitelistedForContentSettings will always return true.
+ const bool should_whitelist_;
+
DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver);
};
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/content_settings_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698