OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_COMMON_EXTENSIONS_EXTENSION_SET_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_SET_H_ |
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_SET_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_SET_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 bool InSameExtent(const GURL& old_url, const GURL& new_url) const; | 59 bool InSameExtent(const GURL& old_url, const GURL& new_url) const; |
60 | 60 |
61 // Look up an Extension object by id. | 61 // Look up an Extension object by id. |
62 const Extension* GetByID(const std::string& id) const; | 62 const Extension* GetByID(const std::string& id) const; |
63 | 63 |
64 // Returns true if |url| should get extension api bindings and be permitted | 64 // Returns true if |url| should get extension api bindings and be permitted |
65 // to make api calls. Note that this is independent of what extension | 65 // to make api calls. Note that this is independent of what extension |
66 // permissions the given extension has been granted. | 66 // permissions the given extension has been granted. |
67 bool ExtensionBindingsAllowed(const GURL& url) const; | 67 bool ExtensionBindingsAllowed(const GURL& url) const; |
68 | 68 |
69 bool SecurityOriginHasAPIPermission( | |
70 const std::string& origin, ExtensionAPIPermission::ID permission) const; | |
Aaron Boodman
2011/10/20 06:53:51
GURL again here.
| |
71 | |
69 private: | 72 private: |
70 FRIEND_TEST_ALL_PREFIXES(ExtensionSetTest, ExtensionSet); | 73 FRIEND_TEST_ALL_PREFIXES(ExtensionSetTest, ExtensionSet); |
71 | 74 |
72 ExtensionMap extensions_; | 75 ExtensionMap extensions_; |
73 | 76 |
74 DISALLOW_COPY_AND_ASSIGN(ExtensionSet); | 77 DISALLOW_COPY_AND_ASSIGN(ExtensionSet); |
75 }; | 78 }; |
76 | 79 |
77 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_SET_H_ | 80 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_SET_H_ |
OLD | NEW |