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..d2648190051e1a81605fbf2b150831a35ab6018a 100644 |
--- a/chrome/browser/permissions/permission_util.h |
+++ b/chrome/browser/permissions/permission_util.h |
@@ -35,34 +35,27 @@ 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); |
+ static std::string GetPermissionString(content::PermissionType); |
raymes
2017/02/07 04:46:15
nit: add a TODO to remove this version of the func
Timothy Loh
2017/02/08 04:01:06
Done, I think we can remove this when we add MIDI
|
- // 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 ContentSettingsTypeType enum that |
raymes
2017/02/07 04:46:15
nit: ContentSettingsType
Timothy Loh
2017/02/08 04:01:06
Done.
|
+ // 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. |
raymes
2017/02/07 04:46:15
nit: leave a TODO to remove this
Timothy Loh
2017/02/08 04:01:06
Done.
|
+ // Limited conversion of ContentSettingsType to PermissionType. Returns true |
+ // if the conversion was performed. |
static bool GetPermissionType(ContentSettingsType type, |
content::PermissionType* out); |