| 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 0d7c7714ec3930ae963e8b53a40f0f0751a85bed..307d2a7fd33fb61aac41b476c9a046f4e3dfeb5e 100644
|
| --- a/chrome/browser/permissions/permission_uma_util.h
|
| +++ b/chrome/browser/permissions/permission_uma_util.h
|
| @@ -35,6 +35,18 @@ enum PermissionAction {
|
| PERMISSION_ACTION_NUM,
|
| };
|
|
|
| +// This should stay in sync with the SourceUI enum in the permission report
|
| +// protobuf (src/chrome/common/safe_browsing/permission_report.proto).
|
| +enum SourceUI {
|
| + PROMPT = 0,
|
| + OIB = 1,
|
| + SITE_SETTINGS = 2,
|
| + PAGE_ACTION = 3,
|
| +
|
| + // Always keep this at the end.
|
| + SOURCE_UI_NUM,
|
| +};
|
| +
|
| // Provides a convenient way of logging UMA for permission related operations.
|
| class PermissionUmaUtil {
|
| public:
|
| @@ -52,18 +64,23 @@ class PermissionUmaUtil {
|
| Profile* profile);
|
| static void PermissionGranted(content::PermissionType permission,
|
| const GURL& requesting_origin,
|
| + SourceUI source_ui,
|
| Profile* profile);
|
| static void PermissionDenied(content::PermissionType permission,
|
| const GURL& requesting_origin,
|
| + SourceUI source_ui,
|
| Profile* profile);
|
| static void PermissionDismissed(content::PermissionType permission,
|
| const GURL& requesting_origin,
|
| + SourceUI source_ui,
|
| Profile* profile);
|
| static void PermissionIgnored(content::PermissionType permission,
|
| const GURL& requesting_origin,
|
| + SourceUI source_ui,
|
| Profile* profile);
|
| static void PermissionRevoked(content::PermissionType permission,
|
| const GURL& revoked_origin,
|
| + SourceUI source_ui,
|
| Profile* profile);
|
|
|
| // UMA specifically for when permission prompts are shown. This should be
|
| @@ -100,6 +117,7 @@ class PermissionUmaUtil {
|
| static void RecordPermissionAction(content::PermissionType permission,
|
| PermissionAction action,
|
| const GURL& requesting_origin,
|
| + SourceUI source_ui,
|
| Profile* profile);
|
| };
|
|
|
|
|