| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // Whether the extension has access to the given |url|. | 124 // Whether the extension has access to the given |url|. |
| 125 bool HasHostPermission(const GURL& url) const; | 125 bool HasHostPermission(const GURL& url) const; |
| 126 | 126 |
| 127 // Whether the extension has effective access to all hosts. This is true if | 127 // Whether the extension has effective access to all hosts. This is true if |
| 128 // there is a content script that matches all hosts, if there is a host | 128 // there is a content script that matches all hosts, if there is a host |
| 129 // permission grants access to all hosts (like <all_urls>) or an api | 129 // permission grants access to all hosts (like <all_urls>) or an api |
| 130 // permission that effectively grants access to all hosts (e.g. proxy, | 130 // permission that effectively grants access to all hosts (e.g. proxy, |
| 131 // network, etc.) | 131 // network, etc.) |
| 132 bool HasEffectiveAccessToAllHosts() const; | 132 bool HasEffectiveAccessToAllHosts() const; |
| 133 | 133 |
| 134 // Returns the full list of permission messages that should display at | 134 // Returns the full list of legacy permission message IDs. |
| 135 // install time. | 135 // Deprecated. You DO NOT want to call this! |
| 136 // TODO(sashab): Deprecate this in favor of GetCoalescedPermissionMessages(). | 136 // TODO(treib): Remove once we've switched to the new system. |
| 137 PermissionMessages GetPermissionMessages() const; | 137 PermissionMessageIDs GetLegacyPermissionMessageIDs() const; |
| 138 | 138 |
| 139 // Returns the full list of permission messages that should display at install | 139 // Returns the full list of permission messages that should display at install |
| 140 // time as strings. | 140 // time as strings. |
| 141 // TODO(sashab): Deprecate this in favor of GetCoalescedPermissionMessages(). | 141 // TODO(sashab): Deprecate this in favor of GetCoalescedPermissionMessages(). |
| 142 std::vector<base::string16> GetPermissionMessageStrings() const; | 142 std::vector<base::string16> GetPermissionMessageStrings() const; |
| 143 | 143 |
| 144 // Returns the full list of permission details for messages that should | 144 // Returns the full list of permission details for messages that should |
| 145 // display at install time as strings. | 145 // display at install time as strings. |
| 146 // TODO(sashab): Deprecate this in favor of GetCoalescedPermissionMessages(). | 146 // TODO(sashab): Deprecate this in favor of GetCoalescedPermissionMessages(). |
| 147 std::vector<base::string16> GetPermissionMessageDetailsStrings() const; | 147 std::vector<base::string16> GetPermissionMessageDetailsStrings() const; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 mutable scoped_refptr<const PermissionSet> withheld_permissions_unsafe_; | 277 mutable scoped_refptr<const PermissionSet> withheld_permissions_unsafe_; |
| 278 | 278 |
| 279 mutable TabPermissionsMap tab_specific_permissions_; | 279 mutable TabPermissionsMap tab_specific_permissions_; |
| 280 | 280 |
| 281 DISALLOW_COPY_AND_ASSIGN(PermissionsData); | 281 DISALLOW_COPY_AND_ASSIGN(PermissionsData); |
| 282 }; | 282 }; |
| 283 | 283 |
| 284 } // namespace extensions | 284 } // namespace extensions |
| 285 | 285 |
| 286 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ | 286 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ |
| OLD | NEW |