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

Unified Diff: components/content_settings/core/browser/content_settings_observer.h

Issue 1803973002: Content Settings: Add RevocationObserver to measure when permissions are revoked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 4 years, 9 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: components/content_settings/core/browser/content_settings_observer.h
diff --git a/components/content_settings/core/browser/content_settings_observer.h b/components/content_settings/core/browser/content_settings_observer.h
index 41868578942081c5020c86846319318f367aa47d..2c2cc900ca8bf57b194fc26bfedde4d7343566eb 100644
--- a/components/content_settings/core/browser/content_settings_observer.h
+++ b/components/content_settings/core/browser/content_settings_observer.h
@@ -20,6 +20,15 @@ class Observer {
ContentSettingsType content_type,
std::string resource_identifier) = 0;
+ // Fired when the content setting for an origin pair is changed from ALLOW to
+ // BLOCK or ASK. Only called when the user's preference is explicitly changed
+ // via HostContentSettingsMap::SetContentSettingDefaultScope().
+ virtual void OnContentSettingRevoked(
+ const GURL& primary_url,
+ const GURL& secondary_url,
+ ContentSettingsType content_type,
+ std::string resource_identifier) {};
+
protected:
virtual ~Observer() {}
};

Powered by Google App Engine
This is Rietveld 408576698