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

Unified Diff: chrome/browser/permissions/permission_uma_util.h

Issue 2675483002: Replace PermissionType in chrome/ with ContentSettingsType (Closed)
Patch Set: rebase + include content_settings_types.h more Created 3 years, 10 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/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);
« no previous file with comments | « chrome/browser/permissions/permission_request_manager_test_api.cc ('k') | chrome/browser/permissions/permission_uma_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698