| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // Records |count| total dismissal actions for a prompt of type |permission| | 117 // Records |count| total dismissal actions for a prompt of type |permission| |
| 118 // for a single origin. | 118 // for a single origin. |
| 119 static void PermissionPromptDismissed(content::PermissionType permission, | 119 static void PermissionPromptDismissed(content::PermissionType permission, |
| 120 int count); | 120 int count); |
| 121 | 121 |
| 122 // Records |count| total ignore actions for a prompt of type |permission| for | 122 // Records |count| total ignore actions for a prompt of type |permission| for |
| 123 // a single origin. | 123 // a single origin. |
| 124 static void PermissionPromptIgnored(content::PermissionType permission, | 124 static void PermissionPromptIgnored(content::PermissionType permission, |
| 125 int count); | 125 int count); |
| 126 | 126 |
| 127 // A permission prompt was accepted or denied, and the prompt displayed a |
| 128 // persistence toggle. Records whether the toggle was enabled (persist) or |
| 129 // disabled (don't persist). |
| 130 static void PermissionPromptAcceptedWithPersistenceToggle( |
| 131 content::PermissionType permission, |
| 132 bool toggle_enabled); |
| 133 |
| 134 static void PermissionPromptDeniedWithPersistenceToggle( |
| 135 content::PermissionType permission, |
| 136 bool toggle_enabled); |
| 137 |
| 127 private: | 138 private: |
| 128 friend class PermissionUmaUtilTest; | 139 friend class PermissionUmaUtilTest; |
| 129 | 140 |
| 130 static bool IsOptedIntoPermissionActionReporting(Profile* profile); | 141 static bool IsOptedIntoPermissionActionReporting(Profile* profile); |
| 131 | 142 |
| 132 static void RecordPermissionAction(content::PermissionType permission, | 143 static void RecordPermissionAction(content::PermissionType permission, |
| 133 PermissionAction action, | 144 PermissionAction action, |
| 134 PermissionSourceUI source_ui, | 145 PermissionSourceUI source_ui, |
| 135 PermissionRequestGestureType gesture_type, | 146 PermissionRequestGestureType gesture_type, |
| 136 const GURL& requesting_origin, | 147 const GURL& requesting_origin, |
| 137 Profile* profile); | 148 Profile* profile); |
| 138 | 149 |
| 139 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUmaUtil); | 150 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUmaUtil); |
| 140 }; | 151 }; |
| 141 | 152 |
| 142 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ | 153 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ |
| OLD | NEW |