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 61a08d9356ef7a2adfeed6bfc62eed93bfdae058..ca61fa6c17ca54012a0f24626f17130c391c84e8 100644 |
--- a/chrome/browser/permissions/permission_uma_util.h |
+++ b/chrome/browser/permissions/permission_uma_util.h |
@@ -17,10 +17,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 { |
@@ -45,7 +41,7 @@ enum class PermissionPersistDecision { |
struct PermissionReportInfo { |
PermissionReportInfo( |
const GURL& origin, |
- content::PermissionType permission, |
+ ContentSettingsType permission, |
PermissionAction action, |
PermissionSourceUI source_ui, |
PermissionRequestGestureType gesture_type, |
@@ -56,7 +52,7 @@ struct PermissionReportInfo { |
PermissionReportInfo(const PermissionReportInfo& other); |
GURL origin; |
- content::PermissionType permission; |
+ ContentSettingsType permission; |
PermissionAction action; |
PermissionSourceUI source_ui; |
PermissionRequestGestureType gesture_type; |
@@ -90,27 +86,32 @@ class PermissionUmaUtil { |
static const char kPermissionsPromptIgnoredPriorDismissCountPrefix[]; |
static const char kPermissionsPromptIgnoredPriorIgnoreCountPrefix[]; |
+ // TODO(timloh): Remove this content::PermissionType overload when possible. |
raymes
2017/02/09 00:39:57
nit: "when possible" is a bit vague. Could you cla
Timothy Loh
2017/02/10 07:25:38
Done.
|
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); |
@@ -158,11 +159,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: |
@@ -170,7 +171,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, |
@@ -180,7 +181,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); |