Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: chrome/browser/permissions/permission_uma_util.h

Issue 2922933002: Remove |accept_states_| from PermissionRequestManager (Closed)
Patch Set: Remove |accept_states_| from PermissionRequestManager Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // - there are other types of permissions prompts (e.g. download limiting) 153 // - there are other types of permissions prompts (e.g. download limiting)
154 // which don't go through PermissionContext 154 // which don't go through PermissionContext
155 // - the above metrics don't always add up (e.g. sum of 155 // - the above metrics don't always add up (e.g. sum of
156 // granted+denied+dismissed+ignored is not equal to requested), so it is 156 // granted+denied+dismissed+ignored is not equal to requested), so it is
157 // unclear from those metrics alone how many prompts are seen by users. 157 // unclear from those metrics alone how many prompts are seen by users.
158 static void PermissionPromptShown( 158 static void PermissionPromptShown(
159 const std::vector<PermissionRequest*>& requests); 159 const std::vector<PermissionRequest*>& requests);
160 160
161 // The following two functions can be combined with the PermissionPromptShown 161 // The following two functions can be combined with the PermissionPromptShown
162 // metrics to calculate accept, deny and ignore rates. 162 // metrics to calculate accept, deny and ignore rates.
163 // Note that for coalesced permission bubbles, PermissionPromptAccepted will
164 // always be called, with |accept_states| containing whether each request was
165 // accepted or denied.
166 static void PermissionPromptAccepted( 163 static void PermissionPromptAccepted(
167 const std::vector<PermissionRequest*>& requests, 164 const std::vector<PermissionRequest*>& requests);
168 const std::vector<bool>& accept_states);
169 165
170 static void PermissionPromptDenied( 166 static void PermissionPromptDenied(
171 const std::vector<PermissionRequest*>& requests); 167 const std::vector<PermissionRequest*>& requests);
172 168
173 // Records the request type and gesture type for a shown, accepted, and denied 169 // Records the request type and gesture type for a shown, accepted, and denied
174 // prompt. Defined separately as Android must call this method explicitly 170 // prompt. Defined separately as Android must call this method explicitly
175 // until the removal of PermissionQueueController is completed. 171 // until the removal of PermissionQueueController is completed.
176 static void RecordPermissionPromptShown( 172 static void RecordPermissionPromptShown(
177 PermissionRequestType request_type, 173 PermissionRequestType request_type,
178 PermissionRequestGestureType gesture_type); 174 PermissionRequestGestureType gesture_type);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 const GURL& requesting_origin, 208 const GURL& requesting_origin,
213 Profile* profile); 209 Profile* profile);
214 210
215 // Records |count| total prior actions for a prompt of type |permission| 211 // Records |count| total prior actions for a prompt of type |permission|
216 // for a single origin using |prefix| for the metric. 212 // for a single origin using |prefix| for the metric.
217 static void RecordPermissionPromptPriorCount( 213 static void RecordPermissionPromptPriorCount(
218 ContentSettingsType permission, 214 ContentSettingsType permission,
219 const std::string& prefix, 215 const std::string& prefix,
220 int count); 216 int count);
221 217
218 static void RecordPromptDecided(
219 const std::vector<PermissionRequest*>& requests,
220 bool accepted);
221
222 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUmaUtil); 222 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUmaUtil);
223 }; 223 };
224 224
225 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ 225 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/permissions/permission_request_manager_unittest.cc ('k') | chrome/browser/permissions/permission_uma_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698