| 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_UMA_UTIL_H_ | 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ |
| 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ | 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 PAGE_ACTION = 3, | 44 PAGE_ACTION = 3, |
| 45 | 45 |
| 46 // Always keep this at the end. | 46 // Always keep this at the end. |
| 47 SOURCE_UI_NUM, | 47 SOURCE_UI_NUM, |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 // Provides a convenient way of logging UMA for permission related operations. | 50 // Provides a convenient way of logging UMA for permission related operations. |
| 51 class PermissionUmaUtil { | 51 class PermissionUmaUtil { |
| 52 public: | 52 public: |
| 53 static const char kPermissionsPromptShown[]; | 53 static const char kPermissionsPromptShown[]; |
| 54 static const char kPermissionsPromptShownGesture[]; |
| 55 static const char kPermissionsPromptShownNoGesture[]; |
| 54 static const char kPermissionsPromptAccepted[]; | 56 static const char kPermissionsPromptAccepted[]; |
| 57 static const char kPermissionsPromptAcceptedGesture[]; |
| 58 static const char kPermissionsPromptAcceptedNoGesture[]; |
| 55 static const char kPermissionsPromptDenied[]; | 59 static const char kPermissionsPromptDenied[]; |
| 60 static const char kPermissionsPromptDeniedGesture[]; |
| 61 static const char kPermissionsPromptDeniedNoGesture[]; |
| 56 static const char kPermissionsPromptRequestsPerPrompt[]; | 62 static const char kPermissionsPromptRequestsPerPrompt[]; |
| 57 static const char kPermissionsPromptMergedBubbleTypes[]; | 63 static const char kPermissionsPromptMergedBubbleTypes[]; |
| 58 static const char kPermissionsPromptMergedBubbleAccepted[]; | 64 static const char kPermissionsPromptMergedBubbleAccepted[]; |
| 59 static const char kPermissionsPromptMergedBubbleDenied[]; | 65 static const char kPermissionsPromptMergedBubbleDenied[]; |
| 60 | 66 |
| 61 static void PermissionRequested(content::PermissionType permission, | 67 static void PermissionRequested(content::PermissionType permission, |
| 62 const GURL& requesting_origin, | 68 const GURL& requesting_origin, |
| 63 const GURL& embedding_origin, | 69 const GURL& embedding_origin, |
| 64 Profile* profile); | 70 Profile* profile); |
| 65 static void PermissionGranted(content::PermissionType permission, | 71 static void PermissionGranted(content::PermissionType permission, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 static void RecordPermissionAction(content::PermissionType permission, | 117 static void RecordPermissionAction(content::PermissionType permission, |
| 112 PermissionAction action, | 118 PermissionAction action, |
| 113 PermissionSourceUI source_ui, | 119 PermissionSourceUI source_ui, |
| 114 const GURL& requesting_origin, | 120 const GURL& requesting_origin, |
| 115 Profile* profile); | 121 Profile* profile); |
| 116 | 122 |
| 117 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUmaUtil); | 123 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUmaUtil); |
| 118 }; | 124 }; |
| 119 | 125 |
| 120 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ | 126 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ |
| OLD | NEW |