Add new enum permissions::RequestType, replacing PermissionRequestType.

RequestType is a new enum in the permissions package that is not
burdened by UMA backwards-compatibility like PermissionRequestType is.
PermissionRequestType is renamed to RequestTypeForUma and is now only
used inside permission_uma_util.h/cc (and related tests). RequestType
also replaces most usages of ContentSettingsType within the permission
package. Prompt icons are now fetched statically via the RequestType.

RequestType will eventually also represent combined requests (for
example, camera and microphone together) but this will be done in a
future patch.

Bug: 1110905
Change-Id: I8a1141488a5b500e796d8baa1fde02a93b8b4169
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2569656
Commit-Queue: Bret Sepulveda <[email protected]>
Auto-Submit: Bret Sepulveda <[email protected]>
Reviewed-by: Ted Choc <[email protected]>
Reviewed-by: Evan Stade <[email protected]>
Reviewed-by: Balazs Engedy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#843097}
diff --git a/components/permissions/permission_request.h b/components/permissions/permission_request.h
index a6fcca9..12e9275 100644
--- a/components/permissions/permission_request.h
+++ b/components/permissions/permission_request.h
@@ -13,11 +13,8 @@
 #include "components/permissions/permission_request_enums.h"
 #include "url/gurl.h"
 
-namespace gfx {
-struct VectorIcon;
-}
-
 namespace permissions {
+enum class RequestType;
 
 // Describes the interface a feature making permission requests should
 // implement. A class of this type is registered with the permission request
@@ -29,19 +26,11 @@
 // requests, or depending on the situation, not shown at all.
 class PermissionRequest {
  public:
-#if defined(OS_ANDROID)
-  // On Android, icons are represented with an IDR_ identifier.
-  typedef int IconId;
-#else
-  // On desktop, we use a vector icon.
-  typedef const gfx::VectorIcon& IconId;
-#endif
-
   PermissionRequest();
   virtual ~PermissionRequest() {}
 
-  // The icon to use next to the message text fragment in the permission bubble.
-  virtual IconId GetIconId() const = 0;
+  // The type of this request.
+  virtual RequestType GetRequestType() const = 0;
 
 #if defined(OS_ANDROID)
   // Returns the full prompt text for this permission. This is currently only
@@ -95,9 +84,6 @@
   // resolve the javascript promise from the requesting origin.
   virtual void RequestFinished() = 0;
 
-  // Used to record UMA metrics for permission requests.
-  virtual PermissionRequestType GetPermissionRequestType() const = 0;
-
   // Used to record UMA for whether requests are associated with a user gesture.
   // To keep things simple this metric is only recorded for the most popular
   // request types.