Chromium Code Reviews| 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 1f5f24b330e0bccd62638ac9557226be2ebc0efb..40b6e1da02ba13b5433660701c109b75e19028c6 100644 |
| --- a/chrome/browser/permissions/permission_uma_util.h |
| +++ b/chrome/browser/permissions/permission_uma_util.h |
| @@ -5,6 +5,8 @@ |
| #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ |
| #define CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ |
| +#include <vector> |
| + |
| #include "base/logging.h" |
| #include "base/macros.h" |
| @@ -15,6 +17,8 @@ namespace content { |
| enum class PermissionType; |
| } // namespace content |
| +class PermissionBubbleRequest; |
| + |
| // Enum for UMA purposes, make sure you update histograms.xml if you add new |
| // permission actions. Never delete or reorder an entry; only add new entries |
| // immediately before PERMISSION_NUM |
| @@ -49,6 +53,18 @@ class PermissionUmaUtil { |
| static void PermissionRevoked(content::PermissionType permission, |
| const GURL& revoked_origin); |
| + // UMA specifically for when permission prompts are shown. This should be |
| + // roughly equivalent to the metrics above, however it is |
| + // useful to have separate UMA to a few reasons: |
| + // - to account for, and get data on coalesced permission bubbles |
| + // - there are other types of permissions prompts (e.g. download limiting) |
| + // which don't go through PermissionContext |
| + // - the above metrics don't always add up (e.g. sum of |
| + // granted+denied+dismissed+ignored is not equal to requested), so it is |
| + // unclear from those metrics alone how many prompts are seen by users. |
| + static void PermissionPromptShown( |
| + const std::vector<PermissionBubbleRequest*> requests); |
|
Lei Zhang
2016/04/19 01:46:05
Pass by const-ref?
benwells
2016/04/20 01:32:10
Done.
|
| + |
| private: |
| DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUmaUtil); |
| }; |