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

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

Issue 1186473004: Move <link rel=preconnect> crossorigin logic to the blink side (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Build issue Created 5 years, 6 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 db8118038a6115675945da4fbd3332bb5332963f..1d3232cd028b00f7539c35a862e17eee1a98560b 100644
--- a/Source/platform/network/NetworkHints.cpp
+++ b/Source/platform/network/NetworkHints.cpp
@@ -41,11 +41,12 @@ void prefetchDNS(const String& hostname)
void preconnect(const KURL& url, const CrossOriginAttributeValue crossOrigin)
{
if (WebPrescientNetworking* prescientNetworking = Platform::current()->prescientNetworking()) {
+ bool allowCredentials = (crossOrigin != CrossOriginAttributeAnonymous);
// TODO(yoav): Call only the crossorigin interface once everything is hooked up.
if (crossOrigin == CrossOriginAttributeNotSet)
prescientNetworking->preconnect(url);
else
- prescientNetworking->preconnect(url, crossOrigin);
+ prescientNetworking->preconnect(url, allowCredentials);
}
}
« 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