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

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

Issue 2463393003: Record permission prompt gesture metrics on Android. (Closed)
Patch Set: Address comments Created 4 years, 1 month 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
« no previous file with comments | « chrome/browser/permissions/permission_uma_util.cc ('k') | chrome/browser/permissions/permission_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/permissions/permission_util.h
diff --git a/chrome/browser/permissions/permission_util.h b/chrome/browser/permissions/permission_util.h
index a51bbc0933d2b3a8de83efe609016ef265007267..7e482d846b1f68f5e990bc325c746b95e412e66f 100644
--- a/chrome/browser/permissions/permission_util.h
+++ b/chrome/browser/permissions/permission_util.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/macros.h"
+#include "chrome/browser/permissions/permission_request.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "url/gurl.h"
@@ -44,6 +45,13 @@ class PermissionUtil {
// Returns the permission string for the given PermissionType.
static std::string GetPermissionString(content::PermissionType permission);
+ // Returns the request type corresponding to a permission type.
+ static PermissionRequestType GetRequestType(content::PermissionType type);
+
+ // Returns the gesture type corresponding to whether a permission request is
+ // made with or without a user gesture.
+ static PermissionRequestGestureType GetGestureType(bool user_gesture);
+
// Limited conversion of ContentSettingsType to PermissionType. Intended for
// recording Permission UMA metrics from areas of the codebase which have not
// yet been converted to PermissionType. Returns true if the conversion was
« no previous file with comments | « chrome/browser/permissions/permission_uma_util.cc ('k') | chrome/browser/permissions/permission_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698