 Chromium Code Reviews
 Chromium Code Reviews Issue 459953002:
  Migrate geolocation permissions to the new common permission class.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 459953002:
  Migrate geolocation permissions to the new common permission class.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| Index: chrome/browser/content_settings/permission_context_uma_util.cc | 
| diff --git a/chrome/browser/content_settings/permission_context_uma_util.cc b/chrome/browser/content_settings/permission_context_uma_util.cc | 
| index 2b7ff8f18f6d8c071bba34f6ffa245493b4fe91e..c2930051b29e13d1daf73be4045e0cb03e5a8a89 100644 | 
| --- a/chrome/browser/content_settings/permission_context_uma_util.cc | 
| +++ b/chrome/browser/content_settings/permission_context_uma_util.cc | 
| @@ -28,6 +28,7 @@ enum PermissionType { | 
| PERMISSION_MIDI_SYSEX = 1, | 
| PERMISSION_PUSH_MESSAGING = 2, | 
| PERMISSION_NOTIFICATIONS = 3, | 
| + PERMISSION_GEOLOCATION = 3, | 
| 
Michael van Ouwerkerk
2014/08/13 10:01:10
4?
 
Miguel Garcia
2014/08/13 13:18:13
Yep, thanks for spotting it.
 | 
| // Always keep this at the end. | 
| PERMISSION_NUM, | 
| @@ -37,9 +38,11 @@ void RecordPermissionAction( | 
| ContentSettingsType permission, PermissionAction action) { | 
| switch (permission) { | 
| case CONTENT_SETTINGS_TYPE_GEOLOCATION: | 
| - // TODO(miguelg): support geolocation through | 
| - // the generic permission class. | 
| - break; | 
| + UMA_HISTOGRAM_ENUMERATION( | 
| + "ContentSettings.PermisionActions_Geolocation", | 
| + action, | 
| + PERMISSION_ACTION_NUM); | 
| + | 
| case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: | 
| UMA_HISTOGRAM_ENUMERATION( | 
| "ContentSettings.PermisionActions_Notifications", | 
| @@ -72,6 +75,9 @@ void RecordPermissionRequest( | 
| ContentSettingsType permission) { | 
| PermissionType type; | 
| switch (permission) { | 
| + case CONTENT_SETTINGS_TYPE_GEOLOCATION: | 
| + type = PERMISSION_GEOLOCATION; | 
| + break; | 
| case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: | 
| type = PERMISSION_NOTIFICATIONS; | 
| break; |