| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 static const char kPermissionsPromptRequestsPerPrompt[]; | 56 static const char kPermissionsPromptRequestsPerPrompt[]; |
| 57 static const char kPermissionsPromptMergedBubbleTypes[]; | 57 static const char kPermissionsPromptMergedBubbleTypes[]; |
| 58 static const char kPermissionsPromptMergedBubbleAccepted[]; | 58 static const char kPermissionsPromptMergedBubbleAccepted[]; |
| 59 static const char kPermissionsPromptMergedBubbleDenied[]; | 59 static const char kPermissionsPromptMergedBubbleDenied[]; |
| 60 | 60 |
| 61 static void PermissionRequested(content::PermissionType permission, | 61 static void PermissionRequested(content::PermissionType permission, |
| 62 const GURL& requesting_origin, | 62 const GURL& requesting_origin, |
| 63 const GURL& embedding_origin, | 63 const GURL& embedding_origin, |
| 64 Profile* profile); | 64 Profile* profile); |
| 65 static void PermissionGranted(content::PermissionType permission, | 65 static void PermissionGranted(content::PermissionType permission, |
| 66 bool user_gesture, |
| 66 const GURL& requesting_origin, | 67 const GURL& requesting_origin, |
| 67 Profile* profile); | 68 Profile* profile); |
| 68 static void PermissionDenied(content::PermissionType permission, | 69 static void PermissionDenied(content::PermissionType permission, |
| 70 bool user_gesture, |
| 69 const GURL& requesting_origin, | 71 const GURL& requesting_origin, |
| 70 Profile* profile); | 72 Profile* profile); |
| 71 static void PermissionDismissed(content::PermissionType permission, | 73 static void PermissionDismissed(content::PermissionType permission, |
| 74 bool user_gesture, |
| 72 const GURL& requesting_origin, | 75 const GURL& requesting_origin, |
| 73 Profile* profile); | 76 Profile* profile); |
| 74 static void PermissionIgnored(content::PermissionType permission, | 77 static void PermissionIgnored(content::PermissionType permission, |
| 78 bool user_gesture, |
| 75 const GURL& requesting_origin, | 79 const GURL& requesting_origin, |
| 76 Profile* profile); | 80 Profile* profile); |
| 77 static void PermissionRevoked(content::PermissionType permission, | 81 static void PermissionRevoked(content::PermissionType permission, |
| 78 PermissionSourceUI source_ui, | 82 PermissionSourceUI source_ui, |
| 79 const GURL& revoked_origin, | 83 const GURL& revoked_origin, |
| 80 Profile* profile); | 84 Profile* profile); |
| 81 | 85 |
| 82 // UMA specifically for when permission prompts are shown. This should be | 86 // UMA specifically for when permission prompts are shown. This should be |
| 83 // roughly equivalent to the metrics above, however it is | 87 // roughly equivalent to the metrics above, however it is |
| 84 // useful to have separate UMA to a few reasons: | 88 // useful to have separate UMA to a few reasons: |
| (...skipping 19 matching lines...) Expand all Loading... |
| 104 const std::vector<PermissionBubbleRequest*>& requests); | 108 const std::vector<PermissionBubbleRequest*>& requests); |
| 105 | 109 |
| 106 private: | 110 private: |
| 107 friend class PermissionUmaUtilTest; | 111 friend class PermissionUmaUtilTest; |
| 108 | 112 |
| 109 static bool IsOptedIntoPermissionActionReporting(Profile* profile); | 113 static bool IsOptedIntoPermissionActionReporting(Profile* profile); |
| 110 | 114 |
| 111 static void RecordPermissionAction(content::PermissionType permission, | 115 static void RecordPermissionAction(content::PermissionType permission, |
| 112 PermissionAction action, | 116 PermissionAction action, |
| 113 PermissionSourceUI source_ui, | 117 PermissionSourceUI source_ui, |
| 118 bool user_gesture, |
| 114 const GURL& requesting_origin, | 119 const GURL& requesting_origin, |
| 115 Profile* profile); | 120 Profile* profile); |
| 116 | 121 |
| 117 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUmaUtil); | 122 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUmaUtil); |
| 118 }; | 123 }; |
| 119 | 124 |
| 120 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ | 125 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ |
| OLD | NEW |