Index: third_party/WebKit/Source/platform/network/NetworkHints.cpp |
diff --git a/third_party/WebKit/Source/platform/network/NetworkHints.cpp b/third_party/WebKit/Source/platform/network/NetworkHints.cpp |
index c2c99f7c232bf9945552c288d0cd6cb31acfedc8..088d0c7b46baedb9cd301727afa3f95a08f768a7 100644 |
--- a/third_party/WebKit/Source/platform/network/NetworkHints.cpp |
+++ b/third_party/WebKit/Source/platform/network/NetworkHints.cpp |
@@ -26,23 +26,27 @@ |
#include "platform/network/NetworkHints.h" |
+#include "platform/PlatformMojoServices.h" |
#include "public/platform/Platform.h" |
#include "public/platform/WebPrescientNetworking.h" |
namespace blink { |
-void prefetchDNS(const String& hostname) |
+void speculativePrefetchDNS(const String& hostname) |
{ |
if (WebPrescientNetworking* prescientNetworking = Platform::current()->prescientNetworking()) |
prescientNetworking->prefetchDNS(hostname); |
} |
+void prefetchDNS(const KURL& url) |
+{ |
+ Platform::current()->mojoServices()->resourceHintsHandler()->Preresolve(url); |
+} |
+ |
void preconnect(const KURL& url, const CrossOriginAttributeValue crossOrigin) |
{ |
- if (WebPrescientNetworking* prescientNetworking = Platform::current()->prescientNetworking()) { |
- bool allowCredentials = (crossOrigin != CrossOriginAttributeAnonymous); |
- prescientNetworking->preconnect(url, allowCredentials); |
- } |
+ bool allowCredentials = (crossOrigin != CrossOriginAttributeAnonymous); |
+ Platform::current()->mojoServices()->resourceHintsHandler()->Preconnect(url, allowCredentials, 1); |
} |
} // namespace blink |