| 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 23 matching lines...) Expand all Loading... |
| 34 // Always keep this at the end. | 34 // Always keep this at the end. |
| 35 PERMISSION_ACTION_NUM, | 35 PERMISSION_ACTION_NUM, |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 // Provides a convenient way of logging UMA for permission related operations. | 38 // Provides a convenient way of logging UMA for permission related operations. |
| 39 class PermissionUmaUtil { | 39 class PermissionUmaUtil { |
| 40 public: | 40 public: |
| 41 static const char kPermissionsPromptShown[]; | 41 static const char kPermissionsPromptShown[]; |
| 42 static const char kPermissionsPromptAccepted[]; | 42 static const char kPermissionsPromptAccepted[]; |
| 43 static const char kPermissionsPromptDenied[]; | 43 static const char kPermissionsPromptDenied[]; |
| 44 static const char kPermissionsPromptGestureShown[]; |
| 45 static const char kPermissionsPromptGestureAccepted[]; |
| 46 static const char kPermissionsPromptGestureDenied[]; |
| 47 static const char kPermissionsPromptNoGestureShown[]; |
| 48 static const char kPermissionsPromptNoGestureAccepted[]; |
| 49 static const char kPermissionsPromptNoGestureDenied[]; |
| 44 static const char kPermissionsPromptRequestsPerPrompt[]; | 50 static const char kPermissionsPromptRequestsPerPrompt[]; |
| 45 static const char kPermissionsPromptMergedBubbleTypes[]; | 51 static const char kPermissionsPromptMergedBubbleTypes[]; |
| 46 static const char kPermissionsPromptMergedBubbleAccepted[]; | 52 static const char kPermissionsPromptMergedBubbleAccepted[]; |
| 47 static const char kPermissionsPromptMergedBubbleDenied[]; | 53 static const char kPermissionsPromptMergedBubbleDenied[]; |
| 48 | 54 |
| 49 static void PermissionRequested(content::PermissionType permission, | 55 static void PermissionRequested(content::PermissionType permission, |
| 50 const GURL& requesting_origin, | 56 const GURL& requesting_origin, |
| 51 const GURL& embedding_origin, | 57 const GURL& embedding_origin, |
| 52 Profile* profile); | 58 Profile* profile); |
| 53 static void PermissionGranted(content::PermissionType permission, | 59 static void PermissionGranted(content::PermissionType permission, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 83 const std::vector<bool>& accept_states); | 89 const std::vector<bool>& accept_states); |
| 84 | 90 |
| 85 static void PermissionPromptDenied( | 91 static void PermissionPromptDenied( |
| 86 const std::vector<PermissionBubbleRequest*>& requests); | 92 const std::vector<PermissionBubbleRequest*>& requests); |
| 87 | 93 |
| 88 private: | 94 private: |
| 89 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUmaUtil); | 95 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUmaUtil); |
| 90 }; | 96 }; |
| 91 | 97 |
| 92 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ | 98 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ |
| OLD | NEW |