| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_ | 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_ |
| 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_ | 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_ |
| 7 | 7 |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "content/public/browser/permission_type.h" | 9 #include "content/public/browser/permission_type.h" |
| 10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 UNUSED_PERMISSION, | 26 UNUSED_PERMISSION, |
| 27 QUOTA, | 27 QUOTA, |
| 28 DOWNLOAD, | 28 DOWNLOAD, |
| 29 MEDIA_STREAM, | 29 MEDIA_STREAM, |
| 30 REGISTER_PROTOCOL_HANDLER, | 30 REGISTER_PROTOCOL_HANDLER, |
| 31 PERMISSION_GEOLOCATION, | 31 PERMISSION_GEOLOCATION, |
| 32 PERMISSION_MIDI_SYSEX, | 32 PERMISSION_MIDI_SYSEX, |
| 33 PERMISSION_NOTIFICATIONS, | 33 PERMISSION_NOTIFICATIONS, |
| 34 PERMISSION_PROTECTED_MEDIA_IDENTIFIER, | 34 PERMISSION_PROTECTED_MEDIA_IDENTIFIER, |
| 35 PERMISSION_PUSH_MESSAGING, | 35 PERMISSION_PUSH_MESSAGING, |
| 36 PERMISSION_PLUGINS, |
| 36 // NUM must be the last value in the enum. | 37 // NUM must be the last value in the enum. |
| 37 NUM | 38 NUM |
| 38 }; | 39 }; |
| 39 | 40 |
| 40 // Used for UMA to record whether a gesture was associated with the request. For | 41 // Used for UMA to record whether a gesture was associated with the request. For |
| 41 // simplicity not all request types track whether a gesture is associated with | 42 // simplicity not all request types track whether a gesture is associated with |
| 42 // it or not, for these types of requests metrics are not recorded. | 43 // it or not, for these types of requests metrics are not recorded. |
| 43 enum class PermissionRequestGestureType { | 44 enum class PermissionRequestGestureType { |
| 44 UNKNOWN, | 45 UNKNOWN, |
| 45 GESTURE, | 46 GESTURE, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // Used to record UMA metrics for permission requests. | 98 // Used to record UMA metrics for permission requests. |
| 98 virtual PermissionRequestType GetPermissionRequestType() const; | 99 virtual PermissionRequestType GetPermissionRequestType() const; |
| 99 | 100 |
| 100 // Used to record UMA for whether requests are associated with a user gesture. | 101 // Used to record UMA for whether requests are associated with a user gesture. |
| 101 // To keep things simple this metric is only recorded for the most popular | 102 // To keep things simple this metric is only recorded for the most popular |
| 102 // request types. | 103 // request types. |
| 103 virtual PermissionRequestGestureType GetGestureType() const; | 104 virtual PermissionRequestGestureType GetGestureType() const; |
| 104 }; | 105 }; |
| 105 | 106 |
| 106 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_ | 107 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_ |
| OLD | NEW |