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

Unified Diff: components/content_settings/core/browser/host_content_settings_map.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: Add test 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/host_content_settings_map.h
diff --git a/components/content_settings/core/browser/host_content_settings_map.h b/components/content_settings/core/browser/host_content_settings_map.h
index 927305765c5d708efa37b1f53d6afcfbffb2260c..77a7fe723fe4ee0d8af21a1e37a42847df57ba15 100644
--- a/components/content_settings/core/browser/host_content_settings_map.h
+++ b/components/content_settings/core/browser/host_content_settings_map.h
@@ -271,6 +271,9 @@ class HostContentSettingsMap : public content_settings::Observer,
void AddObserver(content_settings::Observer* observer);
void RemoveObserver(content_settings::Observer* observer);
+ void AddRevocationObserver(content_settings::RevocationObserver* observer);
+ void RemoveRevocationObserver(content_settings::RevocationObserver* observer);
+
// Schedules any pending lossy website settings to be written to disk.
void FlushLossyWebsiteSettings();
@@ -321,6 +324,11 @@ class HostContentSettingsMap : public content_settings::Observer,
const std::string& resource_identifier,
content_settings::SettingInfo* info) const;
+ void NotifyRevocation(const GURL& primary_url,
+ const GURL& secondary_url,
+ ContentSettingsType content_type,
+ const std::string& resource_identifier);
+
static scoped_ptr<base::Value> GetContentSettingValueAndPatterns(
const content_settings::ProviderInterface* provider,
const GURL& primary_url,
@@ -364,6 +372,8 @@ class HostContentSettingsMap : public content_settings::Observer,
base::ThreadChecker thread_checker_;
base::ObserverList<content_settings::Observer> observers_;
+ base::ObserverList<content_settings::RevocationObserver>
+ revocation_observers_;
DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap);
};

Powered by Google App Engine
This is Rietveld 408576698