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 #include "chrome/common/extensions/extension_set.h" | 5 #include "chrome/common/extensions/extension_set.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/common/extensions/api/url_handlers/url_handlers_parser.h" |
8 #include "chrome/common/extensions/extension.h" | 9 #include "chrome/common/extensions/extension.h" |
| 10 #include "chrome/common/extensions/extension_manifest_constants.h" |
9 #include "chrome/common/extensions/manifest_handlers/sandboxed_page_info.h" | 11 #include "chrome/common/extensions/manifest_handlers/sandboxed_page_info.h" |
10 #include "chrome/common/url_constants.h" | 12 #include "chrome/common/url_constants.h" |
11 #include "extensions/common/constants.h" | 13 #include "extensions/common/constants.h" |
12 | 14 |
13 using WebKit::WebSecurityOrigin; | 15 using WebKit::WebSecurityOrigin; |
14 using extensions::Extension; | 16 using extensions::Extension; |
15 | 17 |
16 ExtensionURLInfo::ExtensionURLInfo(WebSecurityOrigin origin, const GURL& url) | 18 ExtensionURLInfo::ExtensionURLInfo(WebSecurityOrigin origin, const GURL& url) |
17 : origin_(origin), | 19 : origin_(origin), |
18 url_(url) { | 20 url_(url) { |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 bool ExtensionSet::IsSandboxedPage(const ExtensionURLInfo& info) const { | 170 bool ExtensionSet::IsSandboxedPage(const ExtensionURLInfo& info) const { |
169 if (info.url().SchemeIs(extensions::kExtensionScheme)) { | 171 if (info.url().SchemeIs(extensions::kExtensionScheme)) { |
170 const Extension* extension = GetByID(info.url().host()); | 172 const Extension* extension = GetByID(info.url().host()); |
171 if (extension) { | 173 if (extension) { |
172 return extensions::SandboxedPageInfo::IsSandboxedPage(extension, | 174 return extensions::SandboxedPageInfo::IsSandboxedPage(extension, |
173 info.url().path()); | 175 info.url().path()); |
174 } | 176 } |
175 } | 177 } |
176 return false; | 178 return false; |
177 } | 179 } |
OLD | NEW |