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

Unified Diff: Source/platform/network/NetworkHints.cpp

Issue 1135203002: Add <link rel=preconnect> crossorigin attribute (take 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Todo Created 5 years, 7 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
« no previous file with comments | « Source/platform/network/NetworkHints.h ('k') | public/platform/WebCrossOriginAttribute.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/network/NetworkHints.cpp
diff --git a/Source/platform/network/NetworkHints.cpp b/Source/platform/network/NetworkHints.cpp
index e48f51b48529fbbb7c93bedb8dc92e2a16716fc2..db8118038a6115675945da4fbd3332bb5332963f 100644
--- a/Source/platform/network/NetworkHints.cpp
+++ b/Source/platform/network/NetworkHints.cpp
@@ -38,10 +38,15 @@ void prefetchDNS(const String& hostname)
prescientNetworking->prefetchDNS(hostname);
}
-void preconnect(const KURL& url)
+void preconnect(const KURL& url, const CrossOriginAttributeValue crossOrigin)
{
- if (WebPrescientNetworking* prescientNetworking = Platform::current()->prescientNetworking())
- prescientNetworking->preconnect(url);
+ if (WebPrescientNetworking* prescientNetworking = Platform::current()->prescientNetworking()) {
+ // TODO(yoav): Call only the crossorigin interface once everything is hooked up.
+ if (crossOrigin == CrossOriginAttributeNotSet)
+ prescientNetworking->preconnect(url);
+ else
+ prescientNetworking->preconnect(url, crossOrigin);
+ }
}
} // namespace blink
« no previous file with comments | « Source/platform/network/NetworkHints.h ('k') | public/platform/WebCrossOriginAttribute.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698