Index: chrome/browser/permissions/permission_util.h |
diff --git a/chrome/browser/permissions/permission_util.h b/chrome/browser/permissions/permission_util.h |
index 2ad0c7ed2462063d80ca24407a5ecba639bd096a..45c0a975f268334bb1e963912f5adc7b4cbfd05d 100644 |
--- a/chrome/browser/permissions/permission_util.h |
+++ b/chrome/browser/permissions/permission_util.h |
@@ -35,34 +35,29 @@ enum PermissionAction { |
PERMISSION_ACTION_NUM, |
}; |
-struct PermissionTypeHash { |
- std::size_t operator()(const content::PermissionType& type) const; |
-}; |
- |
// A utility class for permissions. |
class PermissionUtil { |
public: |
- // Returns the permission string for the given PermissionType. |
- static std::string GetPermissionString(content::PermissionType permission); |
+ // Returns the permission string for the given permission. |
+ static std::string GetPermissionString(ContentSettingsType); |
+ // TODO(timloh): Remove this function when possible. |
raymes
2017/02/09 00:39:57
nit: Same here and below, "when possible" is too v
Timothy Loh
2017/02/10 07:25:38
Done.
|
+ static std::string GetPermissionString(content::PermissionType); |
- // Return the stringified version of the PermissionType enum that Safe |
- // Browsing uses for the API Blacklist. |
- static std::string ConvertPermissionTypeToSafeBrowsingName( |
- const content::PermissionType& permission_type); |
+ // Return the stringified version of the ContentSettingsType enum that |
+ // Safe Browsing uses for the API Blacklist. |
+ static std::string ConvertContentSettingsTypeToSafeBrowsingName( |
+ ContentSettingsType permission); |
// Returns the request type corresponding to a permission type. |
- static PermissionRequestType GetRequestType(content::PermissionType type); |
+ static PermissionRequestType GetRequestType(ContentSettingsType permission); |
// 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 |
- // performed. |
- // TODO(tsergeant): Remove this function once callsites operate on |
- // PermissionType directly. |
+ // Limited conversion of ContentSettingsType to PermissionType. Returns true |
+ // if the conversion was performed. |
+ // TODO(timloh): We shouldn't need this, remove this function when possible. |
static bool GetPermissionType(ContentSettingsType type, |
content::PermissionType* out); |