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

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

Issue 2952003003: Log site engagement scores for permission actions (Closed)
Patch Set: use histogram_functions Created 3 years, 5 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_REQUEST_H_ 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_
6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_ 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "components/content_settings/core/common/content_settings_types.h" 10 #include "components/content_settings/core/common/content_settings_types.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // The UI this request was associated with was answered by the user. 105 // The UI this request was associated with was answered by the user.
106 // It is safe for the request to be deleted at this point -- it will receive 106 // It is safe for the request to be deleted at this point -- it will receive
107 // no further message from the permission request system. This method will 107 // no further message from the permission request system. This method will
108 // eventually be called on every request which is not unregistered. 108 // eventually be called on every request which is not unregistered.
109 virtual void RequestFinished() = 0; 109 virtual void RequestFinished() = 0;
110 110
111 // True if a persistence toggle should be shown in the UI for this request. 111 // True if a persistence toggle should be shown in the UI for this request.
112 virtual bool ShouldShowPersistenceToggle() const; 112 virtual bool ShouldShowPersistenceToggle() const;
113 113
114 // Used to record UMA metrics for permission requests. 114 // Used to record UMA metrics for permission requests.
115 virtual PermissionRequestType GetPermissionRequestType() const; 115 virtual PermissionRequestType GetPermissionRequestType() const = 0;
116 116
117 // Used to record UMA for whether requests are associated with a user gesture. 117 // Used to record UMA for whether requests are associated with a user gesture.
118 // To keep things simple this metric is only recorded for the most popular 118 // To keep things simple this metric is only recorded for the most popular
119 // request types. 119 // request types.
120 virtual PermissionRequestGestureType GetGestureType() const; 120 virtual PermissionRequestGestureType GetGestureType() const;
121 121
122 // Used on Android to determine what Android OS permissions are needed for 122 // Used on Android to determine what Android OS permissions are needed for
123 // this permission request. 123 // this permission request.
124 virtual ContentSettingsType GetContentSettingsType() const; 124 virtual ContentSettingsType GetContentSettingsType() const;
125 125
126 void set_persist(bool persist) { persist_ = persist; } 126 void set_persist(bool persist) { persist_ = persist; }
127 127
128 protected: 128 protected:
129 bool persist() const { return persist_; } 129 bool persist() const { return persist_; }
130 130
131 private: 131 private:
132 // Whether or not the response for this prompt should be persisted. 132 // Whether or not the response for this prompt should be persisted.
133 bool persist_; 133 bool persist_;
134 134
135 DISALLOW_COPY_AND_ASSIGN(PermissionRequest); 135 DISALLOW_COPY_AND_ASSIGN(PermissionRequest);
136 }; 136 };
137 137
138 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_ 138 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/permissions/mock_permission_request.cc ('k') | chrome/browser/permissions/permission_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698