Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6145)

Unified Diff: chrome/browser/extensions/extension_protocols.cc

Issue 10458063: Add sanbdoxed_pages to allow extension/app pages to be served in a sandboxed, unique origin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_protocols.cc
diff --git a/chrome/browser/extensions/extension_protocols.cc b/chrome/browser/extensions/extension_protocols.cc
index e42c4c7cfe050019bb2304a3bb588f26df82b289..1195e6062f8b86f6070a375bfc56c7782654aa8e 100644
--- a/chrome/browser/extensions/extension_protocols.cc
+++ b/chrome/browser/extensions/extension_protocols.cc
@@ -278,10 +278,13 @@ ExtensionProtocolHandler::MaybeCreateJob(net::URLRequest* request) const {
std::string content_security_policy;
bool send_cors_header = false;
if (extension) {
- content_security_policy = extension->content_security_policy();
+ std::string resource_path = request->url().path();
+ content_security_policy = extension->IsResourceSandboxed(resource_path) ?
Aaron Boodman 2012/06/04 07:05:42 It's kinda a shame that this doesn't pick up any o
Mihai Parparita -not on Chrome 2012/06/04 18:27:02 BTW, the content_security_policy manifest value is
+ extension_misc::kSandboxedContentSecurityPolicy :
+ extension->content_security_policy();
if ((extension->manifest_version() >= 2 ||
extension->HasWebAccessibleResources()) &&
- extension->IsResourceWebAccessible(request->url().path()))
+ extension->IsResourceWebAccessible(resource_path))
send_cors_header = true;
}

Powered by Google App Engine
This is Rietveld 408576698