OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_PERMISSION_SET_H_ | 5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_SET_H_ |
6 #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_SET_H_ | 6 #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_SET_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // Returns true if this permission set includes access to script |url|. | 89 // Returns true if this permission set includes access to script |url|. |
90 bool HasScriptableAccessToURL(const GURL& url) const; | 90 bool HasScriptableAccessToURL(const GURL& url) const; |
91 | 91 |
92 // Returns true if this permission set includes effective access to all | 92 // Returns true if this permission set includes effective access to all |
93 // origins. | 93 // origins. |
94 bool HasEffectiveAccessToAllHosts() const; | 94 bool HasEffectiveAccessToAllHosts() const; |
95 | 95 |
96 // Returns true if this permission set includes effective access to |url|. | 96 // Returns true if this permission set includes effective access to |url|. |
97 bool HasEffectiveAccessToURL(const GURL& url) const; | 97 bool HasEffectiveAccessToURL(const GURL& url) const; |
98 | 98 |
99 // Returns ture if this permission set effectively represents full access | 99 // Returns true if this permission set effectively represents full access |
100 // (e.g. native code). | 100 // (e.g. native code). |
101 bool HasEffectiveFullAccess() const; | 101 bool HasEffectiveFullAccess() const; |
102 | 102 |
103 const APIPermissionSet& apis() const { return apis_; } | 103 const APIPermissionSet& apis() const { return apis_; } |
104 | 104 |
105 const URLPatternSet& effective_hosts() const { return effective_hosts_; } | 105 const URLPatternSet& effective_hosts() const { return effective_hosts_; } |
106 | 106 |
107 const URLPatternSet& explicit_hosts() const { return explicit_hosts_; } | 107 const URLPatternSet& explicit_hosts() const { return explicit_hosts_; } |
108 | 108 |
109 const URLPatternSet& scriptable_hosts() const { return scriptable_hosts_; } | 109 const URLPatternSet& scriptable_hosts() const { return scriptable_hosts_; } |
(...skipping 24 matching lines...) Expand all Loading... |
134 // TODO(jstritar): Rename to "user_script_hosts_"? | 134 // TODO(jstritar): Rename to "user_script_hosts_"? |
135 URLPatternSet scriptable_hosts_; | 135 URLPatternSet scriptable_hosts_; |
136 | 136 |
137 // The list of hosts this effectively grants access to. | 137 // The list of hosts this effectively grants access to. |
138 URLPatternSet effective_hosts_; | 138 URLPatternSet effective_hosts_; |
139 }; | 139 }; |
140 | 140 |
141 } // namespace extensions | 141 } // namespace extensions |
142 | 142 |
143 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_SET_H_ | 143 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_SET_H_ |
OLD | NEW |