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

Unified Diff: Source/core/loader/DocumentThreadableLoader.cpp

Issue 23437013: Consider "mixed content XHR" as mixed script instead of mixed display. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add missing test expectation file. Created 7 years, 4 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/loader/DocumentThreadableLoader.cpp
diff --git a/Source/core/loader/DocumentThreadableLoader.cpp b/Source/core/loader/DocumentThreadableLoader.cpp
index 247f43c8bb743553d9e07826b945988685f3c213..41e867894984b322aa274bd0e14abacf505befdd 100644
--- a/Source/core/loader/DocumentThreadableLoader.cpp
+++ b/Source/core/loader/DocumentThreadableLoader.cpp
@@ -35,6 +35,7 @@
#include "core/dom/Document.h"
#include "core/fetch/FetchRequest.h"
#include "core/fetch/RawResource.h"
+#include "core/fetch/Resource.h"
#include "core/fetch/ResourceFetcher.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/loader/CrossOriginAccessControl.h"
@@ -405,8 +406,8 @@ void DocumentThreadableLoader::loadRequest(const ResourceRequest& request, Secur
ASSERT(m_sameOriginRequest || requestURL.user().isEmpty());
ASSERT(m_sameOriginRequest || requestURL.pass().isEmpty());
+ ThreadableLoaderOptions options = m_options;
if (m_async) {
- ThreadableLoaderOptions options = m_options;
options.crossOriginCredentialPolicy = DoNotAskClientForCrossOriginCredentials;
if (m_actualRequest) {
// Don't sniff content or send load callbacks for the preflight request.
@@ -438,8 +439,7 @@ void DocumentThreadableLoader::loadRequest(const ResourceRequest& request, Secur
ResourceResponse response;
unsigned long identifier = std::numeric_limits<unsigned long>::max();
if (Frame* frame = m_document->frame()) {
- Frame* top = frame->tree()->top();
- if (!top->loader()->mixedContentChecker()->canDisplayInsecureContent(top->document()->securityOrigin(), requestURL)) {
+ if (!m_document->fetcher()->checkInsecureContent(Resource::Raw, requestURL, options.mixedRawContentBlockingOption)) {
m_client->didFail(error);
return;
}

Powered by Google App Engine
This is Rietveld 408576698