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

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

Issue 2226633002: Add a feature to display a persistence toggle for permission prompts on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix null error Created 4 years, 4 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // Note that for coalesced permission bubbles, PermissionPromptAccepted will 107 // Note that for coalesced permission bubbles, PermissionPromptAccepted will
108 // always be called, with |accept_states| containing whether each request was 108 // always be called, with |accept_states| containing whether each request was
109 // accepted or denied. 109 // accepted or denied.
110 static void PermissionPromptAccepted( 110 static void PermissionPromptAccepted(
111 const std::vector<PermissionRequest*>& requests, 111 const std::vector<PermissionRequest*>& requests,
112 const std::vector<bool>& accept_states); 112 const std::vector<bool>& accept_states);
113 113
114 static void PermissionPromptDenied( 114 static void PermissionPromptDenied(
115 const std::vector<PermissionRequest*>& requests); 115 const std::vector<PermissionRequest*>& requests);
116 116
117 // A permission prompt was granted or denied, and the prompt had a persistence
118 // toggle displayed. Records whether the toggle was enabled (persist) or
119 // disabled (don't persist).
120 static void PermissionPromptGrantedWithPersistenceToggle(
121 content::PermissionType permission,
122 bool toggle_enabled);
123
124 static void PermissionPromptDeniedWithPersistenceToggle(
125 content::PermissionType permission,
126 bool toggle_enabled);
127
117 private: 128 private:
118 friend class PermissionUmaUtilTest; 129 friend class PermissionUmaUtilTest;
119 130
120 static bool IsOptedIntoPermissionActionReporting(Profile* profile); 131 static bool IsOptedIntoPermissionActionReporting(Profile* profile);
121 132
122 static void RecordPermissionAction(content::PermissionType permission, 133 static void RecordPermissionAction(content::PermissionType permission,
123 PermissionAction action, 134 PermissionAction action,
124 PermissionSourceUI source_ui, 135 PermissionSourceUI source_ui,
125 PermissionRequestGestureType gesture_type, 136 PermissionRequestGestureType gesture_type,
126 const GURL& requesting_origin, 137 const GURL& requesting_origin,
127 Profile* profile); 138 Profile* profile);
128 139
129 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUmaUtil); 140 DISALLOW_IMPLICIT_CONSTRUCTORS(PermissionUmaUtil);
130 }; 141 };
131 142
132 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_ 143 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UMA_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698