Index: Source/core/html/parser/HTMLResourcePreloader.cpp |
diff --git a/Source/core/html/parser/HTMLResourcePreloader.cpp b/Source/core/html/parser/HTMLResourcePreloader.cpp |
index 6813009b94ab34c93a1df8f9794658f24df168c8..683f9803e75ecd6c4d9c08d18b9fe5f9cde8cf9c 100644 |
--- a/Source/core/html/parser/HTMLResourcePreloader.cpp |
+++ b/Source/core/html/parser/HTMLResourcePreloader.cpp |
@@ -30,7 +30,6 @@ |
#include "core/fetch/FetchInitiatorInfo.h" |
#include "core/fetch/ResourceFetcher.h" |
#include "core/loader/DocumentLoader.h" |
-#include "platform/network/NetworkHints.h" |
#include "public/platform/Platform.h" |
namespace blink { |
@@ -50,7 +49,7 @@ DEFINE_TRACE(HTMLResourcePreloader) |
visitor->trace(m_document); |
} |
-static void preconnectHost(PreloadRequest* request) |
+static void preconnectHost(PreloadRequest* request, const NetworkHintsInterface& networkHintsInterface) |
{ |
ASSERT(request); |
ASSERT(request->isPreconnect()); |
@@ -64,13 +63,13 @@ static void preconnectHost(PreloadRequest* request) |
else |
crossOrigin = CrossOriginAttributeAnonymous; |
} |
- preconnect(host, crossOrigin); |
+ networkHintsInterface.preconnectHost(host, crossOrigin); |
} |
-void HTMLResourcePreloader::preload(PassOwnPtr<PreloadRequest> preload) |
+void HTMLResourcePreloader::preload(PassOwnPtr<PreloadRequest> preload, const NetworkHintsInterface& networkHintsInterface) |
{ |
if (preload->isPreconnect()) { |
- preconnectHost(preload.get()); |
+ preconnectHost(preload.get(), networkHintsInterface); |
return; |
} |
// TODO(yoichio): Should preload if document is imported. |