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

Unified Diff: Source/core/html/HTMLImportsController.cpp

Issue 19940002: [HTML Import] Respect Content Security Policy Model (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Switched to Per-import CSP model Created 7 years, 5 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: Source/core/html/HTMLImportsController.cpp
diff --git a/Source/core/html/HTMLImportsController.cpp b/Source/core/html/HTMLImportsController.cpp
index 91c93204cf1b067164bd2738eb38709b88723eb2..60089a7891d5f3612595a8f9c760d1669471fdb4 100644
--- a/Source/core/html/HTMLImportsController.cpp
+++ b/Source/core/html/HTMLImportsController.cpp
@@ -38,6 +38,7 @@
#include "core/loader/DocumentWriter.h"
#include "core/loader/cache/CachedScript.h"
#include "core/loader/cache/ResourceFetcher.h"
+#include "core/page/ContentSecurityPolicy.h"
#include "weborigin/SecurityOrigin.h"
namespace WebCore {
@@ -90,7 +91,7 @@ void LinkImport::process()
FetchRequest request = builder.build(true);
request.setPotentiallyCrossOriginEnabled(controller->securityOrigin(), DoNotAllowStoredCredentials);
- CachedResourceHandle<CachedRawResource> resource = controller->fetcher()->requestRawResource(request);
+ CachedResourceHandle<CachedRawResource> resource = m_owner->document()->fetcher()->requestImport(request);
abarth-chromium 2013/07/25 04:53:09 requestImport -> fetchImport ? :) Not worth re
if (!resource)
return;
@@ -180,6 +181,7 @@ HTMLImportLoader::State HTMLImportLoader::startParsing(const ResourceResponse& r
return StateError;
m_importedDocument = HTMLDocument::create(DocumentInit(response.url(), 0, this));
+ m_importedDocument->initContentSecurityPolicy(ContentSecurityPolicyResponseHeaders(response));
m_writer = DocumentWriter::create(m_importedDocument.get(), response.mimeType(), response.textEncodingName());
return StateLoading;

Powered by Google App Engine
This is Rietveld 408576698