| 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/extension.h" | 8 #include "chrome/common/extensions/extension.h" |
| 9 #include "chrome/common/extensions/sandboxed_page_info.h" |
| 9 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
| 10 #include "extensions/common/constants.h" | 11 #include "extensions/common/constants.h" |
| 11 | 12 |
| 12 using WebKit::WebSecurityOrigin; | 13 using WebKit::WebSecurityOrigin; |
| 13 using extensions::Extension; | 14 using extensions::Extension; |
| 14 | 15 |
| 15 ExtensionURLInfo::ExtensionURLInfo(WebSecurityOrigin origin, const GURL& url) | 16 ExtensionURLInfo::ExtensionURLInfo(WebSecurityOrigin origin, const GURL& url) |
| 16 : origin_(origin), | 17 : origin_(origin), |
| 17 url_(url) { | 18 url_(url) { |
| 18 DCHECK(!origin_.isNull()); | 19 DCHECK(!origin_.isNull()); |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 return true; | 162 return true; |
| 162 } | 163 } |
| 163 | 164 |
| 164 return false; | 165 return false; |
| 165 } | 166 } |
| 166 | 167 |
| 167 bool ExtensionSet::IsSandboxedPage(const ExtensionURLInfo& info) const { | 168 bool ExtensionSet::IsSandboxedPage(const ExtensionURLInfo& info) const { |
| 168 if (info.url().SchemeIs(extensions::kExtensionScheme)) { | 169 if (info.url().SchemeIs(extensions::kExtensionScheme)) { |
| 169 const Extension* extension = GetByID(info.url().host()); | 170 const Extension* extension = GetByID(info.url().host()); |
| 170 if (extension) { | 171 if (extension) { |
| 171 return extension->IsSandboxedPage(info.url().path()); | 172 return extensions::SandboxedPageInfo::IsSandboxedPage(extension, |
| 173 info.url().path()); |
| 172 } | 174 } |
| 173 } | 175 } |
| 174 return false; | 176 return false; |
| 175 } | 177 } |
| OLD | NEW |