Index: chrome/browser/permissions/permission_util.h |
diff --git a/chrome/browser/permissions/permission_util.h b/chrome/browser/permissions/permission_util.h |
index b63b2e084485bf9b157a7809fd4a0e049d34af81..755ebcff5af4a493ab72289df609371f28028d25 100644 |
--- a/chrome/browser/permissions/permission_util.h |
+++ b/chrome/browser/permissions/permission_util.h |
@@ -12,6 +12,7 @@ |
#include "components/content_settings/core/common/content_settings_types.h" |
#include "url/gurl.h" |
+class HostContentSettingsMap; |
class Profile; |
namespace content { |
@@ -41,7 +42,9 @@ class PermissionUtil { |
// A scoped class that will check the current resolved content setting on |
// construction and report a revocation metric accordingly if the revocation |
- // condition is met (from ALLOW to something else). |
+ // condition is met (from ALLOW to something else). By default, |
+ // |settings_map_| is obtained from |profile_|, but it can be changed with the |
+ // setter if necessary. |
class ScopedRevocationReporter { |
public: |
ScopedRevocationReporter(Profile* profile, |
@@ -50,10 +53,19 @@ class PermissionUtil { |
ContentSettingsType content_type, |
PermissionSourceUI source_ui); |
+ ScopedRevocationReporter(Profile* profile, |
+ const ContentSettingsPattern& primary_pattern, |
+ const ContentSettingsPattern& secondary_pattern, |
+ ContentSettingsType content_type, |
+ PermissionSourceUI source_ui); |
+ |
+ void SetCustomSettingsMap(HostContentSettingsMap* settings_map); |
+ |
~ScopedRevocationReporter(); |
private: |
Profile* profile_; |
+ HostContentSettingsMap* settings_map_; |
const GURL primary_url_; |
const GURL secondary_url_; |
ContentSettingsType content_type_; |