Index: chrome/browser/permissions/permission_uma_util.h |
diff --git a/chrome/browser/permissions/permission_uma_util.h b/chrome/browser/permissions/permission_uma_util.h |
index e486c84185c6258f03f055a8bf85409d0811ff1e..f1efe4cfa5cf9116900c0fe929200567fbda7951 100644 |
--- a/chrome/browser/permissions/permission_uma_util.h |
+++ b/chrome/browser/permissions/permission_uma_util.h |
@@ -18,10 +18,6 @@ class GURL; |
class PermissionRequest; |
class Profile; |
-namespace content { |
-enum class PermissionType; |
-} // namespace content |
- |
// This should stay in sync with the SourceUI enum in the permission report |
// protobuf (src/chrome/common/safe_browsing/permission_report.proto). |
enum class PermissionSourceUI { |
@@ -56,7 +52,7 @@ enum SafeBrowsingResponse { |
struct PermissionReportInfo { |
PermissionReportInfo( |
const GURL& origin, |
- content::PermissionType permission, |
+ ContentSettingsType permission, |
PermissionAction action, |
PermissionSourceUI source_ui, |
PermissionRequestGestureType gesture_type, |
@@ -67,7 +63,7 @@ struct PermissionReportInfo { |
PermissionReportInfo(const PermissionReportInfo& other); |
GURL origin; |
- content::PermissionType permission; |
+ ContentSettingsType permission; |
PermissionAction action; |
PermissionSourceUI source_ui; |
PermissionRequestGestureType gesture_type; |
@@ -110,27 +106,33 @@ class PermissionUmaUtil { |
static const char kPermissionsPromptIgnoredPriorDismissCountPrefix[]; |
static const char kPermissionsPromptIgnoredPriorIgnoreCountPrefix[]; |
+ // TODO(timloh): Remove this content::PermissionType overload when we add MIDI |
+ // to ContentSettingsType. |
static void PermissionRequested(content::PermissionType permission, |
const GURL& requesting_origin, |
const GURL& embedding_origin, |
Profile* profile); |
- static void PermissionGranted(content::PermissionType permission, |
+ static void PermissionRequested(ContentSettingsType permission, |
+ const GURL& requesting_origin, |
+ const GURL& embedding_origin, |
+ Profile* profile); |
+ static void PermissionGranted(ContentSettingsType permission, |
PermissionRequestGestureType gesture_type, |
const GURL& requesting_origin, |
Profile* profile); |
- static void PermissionDenied(content::PermissionType permission, |
+ static void PermissionDenied(ContentSettingsType permission, |
PermissionRequestGestureType gesture_type, |
const GURL& requesting_origin, |
Profile* profile); |
- static void PermissionDismissed(content::PermissionType permission, |
+ static void PermissionDismissed(ContentSettingsType permission, |
PermissionRequestGestureType gesture_type, |
const GURL& requesting_origin, |
Profile* profile); |
- static void PermissionIgnored(content::PermissionType permission, |
+ static void PermissionIgnored(ContentSettingsType permission, |
PermissionRequestGestureType gesture_type, |
const GURL& requesting_origin, |
Profile* profile); |
- static void PermissionRevoked(content::PermissionType permission, |
+ static void PermissionRevoked(ContentSettingsType permission, |
PermissionSourceUI source_ui, |
const GURL& revoked_origin, |
Profile* profile); |
@@ -184,11 +186,11 @@ class PermissionUmaUtil { |
// persistence toggle. Records whether the toggle was enabled (persist) or |
// disabled (don't persist). |
static void PermissionPromptAcceptedWithPersistenceToggle( |
- content::PermissionType permission, |
+ ContentSettingsType permission, |
bool toggle_enabled); |
static void PermissionPromptDeniedWithPersistenceToggle( |
- content::PermissionType permission, |
+ ContentSettingsType permission, |
bool toggle_enabled); |
private: |
@@ -196,7 +198,7 @@ class PermissionUmaUtil { |
static bool IsOptedIntoPermissionActionReporting(Profile* profile); |
- static void RecordPermissionAction(content::PermissionType permission, |
+ static void RecordPermissionAction(ContentSettingsType permission, |
PermissionAction action, |
PermissionSourceUI source_ui, |
PermissionRequestGestureType gesture_type, |
@@ -206,7 +208,7 @@ class PermissionUmaUtil { |
// Records |count| total prior actions for a prompt of type |permission| |
// for a single origin using |prefix| for the metric. |
static void RecordPermissionPromptPriorCount( |
- content::PermissionType permission, |
+ ContentSettingsType permission, |
const std::string& prefix, |
int count); |