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

Unified Diff: third_party/WebKit/Source/core/loader/LinkLoader.cpp

Issue 2751043002: DevTools: expose linkPreload bit on the network request. (Closed)
Patch Set: todo added as per request Created 3 years, 9 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: third_party/WebKit/Source/core/loader/LinkLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/LinkLoader.cpp b/third_party/WebKit/Source/core/loader/LinkLoader.cpp
index e1ba30d59c3f79e1d8a6218ebd9a5f0235435377..bdbd13a89dc951a18f7bda284897e00765aa860e 100644
--- a/third_party/WebKit/Source/core/loader/LinkLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/LinkLoader.cpp
@@ -328,6 +328,7 @@ static Resource* preloadIfNeeded(const LinkRelAttribute& relAttribute,
resourceRequest.setHTTPReferrer(SecurityPolicy::generateReferrer(
referrerPolicy, href, document.outgoingReferrer()));
}
+ resourceRequest.setLinkPreload(true);
FetchRequest linkRequest(resourceRequest, FetchInitiatorTypeNames::link,
document.encodingName());
@@ -342,7 +343,6 @@ static Resource* preloadIfNeeded(const LinkRelAttribute& relAttribute,
OtherMessageSource, VerboseMessageLevel,
String("Preload triggered for " + href.host() + href.path())));
}
- linkRequest.setLinkPreload(true);
return document.loader()->startPreload(resourceType.value(), linkRequest);
}

Powered by Google App Engine
This is Rietveld 408576698