OLD | NEW |
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 <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // permission that effectively grants access to all hosts (e.g. proxy, | 131 // permission that effectively grants access to all hosts (e.g. proxy, |
132 // network, etc.) | 132 // network, etc.) |
133 bool HasEffectiveAccessToAllHosts() const; | 133 bool HasEffectiveAccessToAllHosts() const; |
134 | 134 |
135 // Returns the full list of legacy permission message IDs. | 135 // Returns the full list of legacy permission message IDs. |
136 // Deprecated. You DO NOT want to call this! | 136 // Deprecated. You DO NOT want to call this! |
137 // TODO(treib): Remove once we've switched to the new system. | 137 // TODO(treib): Remove once we've switched to the new system. |
138 PermissionMessageIDs GetLegacyPermissionMessageIDs() const; | 138 PermissionMessageIDs GetLegacyPermissionMessageIDs() const; |
139 | 139 |
140 // Returns the full list of permission messages that should display at install | 140 // Returns the full list of permission messages that should display at install |
141 // time as strings. | 141 // time, including their submessages, as strings. |
| 142 // TODO(treib): Remove this and move callers over to |
| 143 // GetCoalescedPermissionMessages once we've fully switched to the new system. |
142 PermissionMessageStrings GetPermissionMessageStrings() const; | 144 PermissionMessageStrings GetPermissionMessageStrings() const; |
143 | 145 |
144 // Returns the full list of permission messages that should display at install | |
145 // time as strings. | |
146 // TODO(sashab): Deprecate this in favor of GetPermissionMessageStrings. | |
147 std::vector<base::string16> GetLegacyPermissionMessageStrings() const; | |
148 | |
149 // Returns the full list of permission details for messages that should | |
150 // display at install time as strings. | |
151 // TODO(sashab): Deprecate this in favor of GetPermissionMessageStrings. | |
152 std::vector<base::string16> GetLegacyPermissionMessageDetailsStrings() const; | |
153 | |
154 // Returns the full list of permission details for messages that should | 146 // Returns the full list of permission details for messages that should |
155 // display at install time, in a nested format ready for display. | 147 // display at install time, in a nested format ready for display. |
156 CoalescedPermissionMessages GetCoalescedPermissionMessages() const; | 148 CoalescedPermissionMessages GetCoalescedPermissionMessages() const; |
157 | 149 |
158 // Returns true if the extension has requested all-hosts permissions (or | 150 // Returns true if the extension has requested all-hosts permissions (or |
159 // something close to it), but has had it withheld. | 151 // something close to it), but has had it withheld. |
160 bool HasWithheldImpliedAllHosts() const; | 152 bool HasWithheldImpliedAllHosts() const; |
161 | 153 |
162 // Returns true if the |extension| has permission to access and interact with | 154 // Returns true if the |extension| has permission to access and interact with |
163 // the specified page, in order to do things like inject scripts or modify | 155 // the specified page, in order to do things like inject scripts or modify |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 mutable scoped_refptr<const PermissionSet> withheld_permissions_unsafe_; | 274 mutable scoped_refptr<const PermissionSet> withheld_permissions_unsafe_; |
283 | 275 |
284 mutable TabPermissionsMap tab_specific_permissions_; | 276 mutable TabPermissionsMap tab_specific_permissions_; |
285 | 277 |
286 DISALLOW_COPY_AND_ASSIGN(PermissionsData); | 278 DISALLOW_COPY_AND_ASSIGN(PermissionsData); |
287 }; | 279 }; |
288 | 280 |
289 } // namespace extensions | 281 } // namespace extensions |
290 | 282 |
291 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ | 283 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ |
OLD | NEW |