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

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

Issue 2165653004: Don't wait for AppCache for link rel preloads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove empty check 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/LinkLoader.h
diff --git a/third_party/WebKit/Source/core/loader/LinkLoader.h b/third_party/WebKit/Source/core/loader/LinkLoader.h
index a9f0b1dddf04549c846655605083454233b31436..ac40af66dfd05c796fdd62338df12e67c8cc6455 100644
--- a/third_party/WebKit/Source/core/loader/LinkLoader.h
+++ b/third_party/WebKit/Source/core/loader/LinkLoader.h
@@ -75,7 +75,10 @@ public:
void released();
bool loadLink(const LinkRelAttribute&, CrossOriginAttributeValue, const String& type, const String& as, const String& media, const KURL&, Document&, const NetworkHintsInterface&);
enum CanLoadResources { OnlyLoadResources, DoNotLoadResources, LoadResourcesAndPreconnect };
- static void loadLinksFromHeader(const String& headerValue, const KURL& baseURL, Document*, const NetworkHintsInterface&, CanLoadResources, ViewportDescriptionWrapper*);
+ // Media links cannot be preloaded until the first chunk is parsed. The rest
+ // can be preloaded at commit time.
+ enum MediaPreloadPolicy { LoadAll, OnlyLoadNonMedia, OnlyLoadMedia };
+ static void loadLinksFromHeader(const String& headerValue, const KURL& baseURL, Document*, const NetworkHintsInterface&, CanLoadResources, MediaPreloadPolicy, ViewportDescriptionWrapper*);
static bool getResourceTypeFromAsAttribute(const String& as, Resource::Type&);
DECLARE_TRACE();
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | third_party/WebKit/Source/core/loader/LinkLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698