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

Side by Side Diff: extensions/common/permissions/permissions_data.h

Issue 2821123002: Differentiate new permissions from old in extension permission update bubble (Closed)
Patch Set: Created 3 years, 8 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ 5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_
6 #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ 6 #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // there is a content script that matches all hosts, if there is a host 133 // there is a content script that matches all hosts, if there is a host
134 // permission grants access to all hosts (like <all_urls>) or an api 134 // permission grants access to all hosts (like <all_urls>) or an api
135 // permission that effectively grants access to all hosts (e.g. proxy, 135 // permission that effectively grants access to all hosts (e.g. proxy,
136 // network, etc.) 136 // network, etc.)
137 bool HasEffectiveAccessToAllHosts() const; 137 bool HasEffectiveAccessToAllHosts() const;
138 138
139 // Returns the full list of permission details for messages that should 139 // Returns the full list of permission details for messages that should
140 // display at install time, in a nested format ready for display. 140 // display at install time, in a nested format ready for display.
141 PermissionMessages GetPermissionMessages() const; 141 PermissionMessages GetPermissionMessages() const;
142 142
143 // Returns the full list of permission details for messages that should
144 // display at install time, in a nested format ready for display.
145 PermissionMessages GetPermissionMessages(
Devlin 2017/04/19 19:18:33 I wonder if this would be cleaner as GetNewPermiss
catmullings 2017/04/20 02:01:59 Yup, that's sounds good. Will make that change.
catmullings 2017/04/20 02:01:59 Done.
146 const PermissionSet& permissions) const;
147
143 // Returns true if the extension has requested all-hosts permissions (or 148 // Returns true if the extension has requested all-hosts permissions (or
144 // something close to it), but has had it withheld. 149 // something close to it), but has had it withheld.
145 bool HasWithheldImpliedAllHosts() const; 150 bool HasWithheldImpliedAllHosts() const;
146 151
147 // Returns true if the |extension| has permission to access and interact with 152 // Returns true if the |extension| has permission to access and interact with
148 // the specified page, in order to do things like inject scripts or modify 153 // the specified page, in order to do things like inject scripts or modify
149 // the content. 154 // the content.
150 // If this returns false and |error| is non-NULL, |error| will be popualted 155 // If this returns false and |error| is non-NULL, |error| will be popualted
151 // with the reason the extension cannot access the page. 156 // with the reason the extension cannot access the page.
152 bool CanAccessPage(const Extension* extension, 157 bool CanAccessPage(const Extension* extension,
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 mutable TabPermissionsMap tab_specific_permissions_; 263 mutable TabPermissionsMap tab_specific_permissions_;
259 264
260 mutable std::unique_ptr<base::ThreadChecker> thread_checker_; 265 mutable std::unique_ptr<base::ThreadChecker> thread_checker_;
261 266
262 DISALLOW_COPY_AND_ASSIGN(PermissionsData); 267 DISALLOW_COPY_AND_ASSIGN(PermissionsData);
263 }; 268 };
264 269
265 } // namespace extensions 270 } // namespace extensions
266 271
267 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ 272 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698