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

Unified Diff: chrome/browser/content_settings/content_settings_mock_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: chrome/browser/content_settings/content_settings_mock_observer.h
diff --git a/chrome/browser/content_settings/content_settings_mock_observer.h b/chrome/browser/content_settings/content_settings_mock_observer.h
index 0d9989f2b259ead1331e994b6a0753cd507e0eb0..c65c9f7e38e00d05433c3fdc718cfd4156927fdf 100644
--- a/chrome/browser/content_settings/content_settings_mock_observer.h
+++ b/chrome/browser/content_settings/content_settings_mock_observer.h
@@ -10,6 +10,7 @@
#include "base/macros.h"
#include "components/content_settings/core/browser/content_settings_observer.h"
#include "testing/gmock/include/gmock/gmock.h"
+#include "url/gurl.h"
namespace content_settings {
@@ -27,6 +28,25 @@ class MockObserver : public Observer {
DISALLOW_COPY_AND_ASSIGN(MockObserver);
};
+class MockRevocationObserver : public Observer {
+ public:
+ MockRevocationObserver();
+ virtual ~MockRevocationObserver();
+
+ void OnContentSettingChanged(const ContentSettingsPattern& primary_pattern,
+ const ContentSettingsPattern& secondary_pattern,
+ ContentSettingsType content_type,
+ std::string resource_identifier);
+
+ MOCK_METHOD4(OnContentSettingRevoked,
+ void(const GURL&,
+ const GURL&,
+ ContentSettingsType,
+ std::string));
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockRevocationObserver);
+};
+
} // namespace content_settings
#endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_MOCK_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698