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

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

Issue 2165653004: Don't wait for AppCache for link rel preloads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dont parse / do more initialization than necessary for media link preload headers Created 4 years, 5 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/DocumentLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
index ba24f4d6e21fde07e25248049e60d76cc9ebd5b4..f971afbe9ae6ea122f4001843815484f6a8690c1 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -208,6 +208,15 @@ Resource* DocumentLoader::startPreload(Resource::Type type, FetchRequest& reques
return resource;
}
+void DocumentLoader::dispatchLinkHeaderPreloads(ViewportDescriptionWrapper* viewport, LinkLoader::MediaPreloadPolicy mediaPolicy)
+{
+ String linkHeader = response().httpHeaderField(HTTPNames::Link);
+ if (!linkHeader.isEmpty()) {
Yoav Weiss 2016/07/22 16:03:46 Why is this wrapper needed? There's already an emp
Charlie Harrison 2016/07/22 16:54:24 Ah good catch. Removed. I still kept this helper f
+ LinkLoader::loadLinksFromHeader(linkHeader, response().url(),
+ m_frame->document(), NetworkHintsInterfaceImpl(), LinkLoader::OnlyLoadResources, mediaPolicy, viewport);
+ }
+}
+
void DocumentLoader::didChangePerformanceTiming()
{
if (frame() && frame()->isMainFrame() && m_state >= Committed) {
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.h ('k') | third_party/WebKit/Source/core/loader/FrameFetchContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698