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

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

Issue 2339863002: Use vector of PermissionRequest instead of ContentSettingsTypes for GroupedPermissionInfoBarDelegate (Closed)
Patch Set: address review comments Created 4 years, 2 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 "content/public/browser/permission_type.h" 11 #include "content/public/browser/permission_type.h"
11 #include "url/gurl.h" 12 #include "url/gurl.h"
12 13
13 namespace gfx { 14 namespace gfx {
14 enum class VectorIconId; 15 enum class VectorIconId;
15 } 16 }
16 17
17 // Used for UMA to record the types of permission prompts shown. 18 // Used for UMA to record the types of permission prompts shown.
18 // This corresponds to the PermissionRequestType enum in 19 // This corresponds to the PermissionRequestType enum in
19 // src/tools/metrics/histograms.xml. The usual rules of updating UMA values 20 // src/tools/metrics/histograms.xml. The usual rules of updating UMA values
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 virtual bool ShouldShowPersistenceToggle() const; 102 virtual bool ShouldShowPersistenceToggle() const;
102 103
103 // Used to record UMA metrics for permission requests. 104 // Used to record UMA metrics for permission requests.
104 virtual PermissionRequestType GetPermissionRequestType() const; 105 virtual PermissionRequestType GetPermissionRequestType() const;
105 106
106 // Used to record UMA for whether requests are associated with a user gesture. 107 // Used to record UMA for whether requests are associated with a user gesture.
107 // To keep things simple this metric is only recorded for the most popular 108 // To keep things simple this metric is only recorded for the most popular
108 // request types. 109 // request types.
109 virtual PermissionRequestGestureType GetGestureType() const; 110 virtual PermissionRequestGestureType GetGestureType() const;
110 111
112 // Used for grouped permission infobar.
tsergeant 2016/09/28 00:01:07 Can you be more specific in this comment? "Used o
lshang 2016/09/28 00:47:07 Done with this comment comment XD
113 virtual ContentSettingsType GetContentSettingsType() const;
114
111 void set_persist(bool persist) { persist_ = persist; } 115 void set_persist(bool persist) { persist_ = persist; }
112 116
113 protected: 117 protected:
114 bool persist() const { return persist_; } 118 bool persist() const { return persist_; }
115 119
116 private: 120 private:
117 // Whether or not the response for this prompt should be persisted. 121 // Whether or not the response for this prompt should be persisted.
118 bool persist_; 122 bool persist_;
119 123
120 DISALLOW_COPY_AND_ASSIGN(PermissionRequest); 124 DISALLOW_COPY_AND_ASSIGN(PermissionRequest);
121 }; 125 };
122 126
123 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_ 127 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/permissions/grouped_permission_infobar_delegate.cc ('k') | chrome/browser/permissions/permission_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698