| Index: chrome/browser/permissions/permission_util.h
|
| diff --git a/chrome/browser/permissions/permission_util.h b/chrome/browser/permissions/permission_util.h
|
| index eb0e066f2484c2825e7ed059fe9ebcb7ac7df00f..dcc9095c4b7eb51c73ab694fd76d961d4d93e23b 100644
|
| --- a/chrome/browser/permissions/permission_util.h
|
| +++ b/chrome/browser/permissions/permission_util.h
|
| @@ -8,8 +8,12 @@
|
| #include <string>
|
|
|
| #include "base/macros.h"
|
| +#include "components/content_settings/core/common/content_settings.h"
|
| #include "components/content_settings/core/common/content_settings_types.h"
|
|
|
| +class GURL;
|
| +class Profile;
|
| +
|
| namespace content {
|
| enum class PermissionType;
|
| } // namespace content
|
| @@ -29,6 +33,23 @@ class PermissionUtil {
|
| static bool GetPermissionType(ContentSettingsType type,
|
| content::PermissionType* out);
|
|
|
| + // Helper method which proxies
|
| + // HostContentSettingsMap::SetContentSettingDefaultScope(). Checks the content
|
| + // setting value before and after the change to determine whether it has gone
|
| + // from ALLOW to BLOCK or ASK, and records metrics accordingly. Should be
|
| + // called from UI code when a user changes permissions for a particular origin
|
| + // pair.
|
| + // TODO(tsergeant): This is a temporary solution to begin gathering metrics.
|
| + // We should integrate this better with the permissions layer. See
|
| + // crbug.com/469221.
|
| + static void SetContentSettingAndRecordRevocation(
|
| + Profile* profile,
|
| + const GURL& primary_url,
|
| + const GURL& secondary_url,
|
| + ContentSettingsType content_type,
|
| + std::string resource_identifier,
|
| + ContentSetting setting);
|
| +
|
| private:
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUtil);
|
| };
|
|
|