OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <iterator> | 8 #include <iterator> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "chrome/common/extensions/extension.h" | 14 #include "chrome/common/extensions/extension.h" |
15 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
17 | 17 |
| 18 namespace extensions { |
| 19 struct UrlHandlerInfo; |
| 20 }; |
| 21 |
18 class ExtensionURLInfo { | 22 class ExtensionURLInfo { |
19 public: | 23 public: |
20 // The extension system uses both a document's origin and its URL to | 24 // The extension system uses both a document's origin and its URL to |
21 // grant permissions. Ideally, we would use only the origin, but because | 25 // grant permissions. Ideally, we would use only the origin, but because |
22 // the web extent of a hosted app can be less than an entire origin, we | 26 // the web extent of a hosted app can be less than an entire origin, we |
23 // take the URL into account as well | 27 // take the URL into account as well |
24 ExtensionURLInfo(WebKit::WebSecurityOrigin origin, const GURL& url); | 28 ExtensionURLInfo(WebKit::WebSecurityOrigin origin, const GURL& url); |
25 | 29 |
26 // WARNING! Using this constructor can miss important security checks if | 30 // WARNING! Using this constructor can miss important security checks if |
27 // you're trying to find a running extension. For example, if the | 31 // you're trying to find a running extension. For example, if the |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 142 |
139 private: | 143 private: |
140 FRIEND_TEST_ALL_PREFIXES(ExtensionSetTest, ExtensionSet); | 144 FRIEND_TEST_ALL_PREFIXES(ExtensionSetTest, ExtensionSet); |
141 | 145 |
142 ExtensionMap extensions_; | 146 ExtensionMap extensions_; |
143 | 147 |
144 DISALLOW_COPY_AND_ASSIGN(ExtensionSet); | 148 DISALLOW_COPY_AND_ASSIGN(ExtensionSet); |
145 }; | 149 }; |
146 | 150 |
147 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_SET_H_ | 151 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_SET_H_ |
OLD | NEW |