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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp

Issue 2219663005: [NoStatePrefetch] Set LOAD_PREFETCH flag on all prefetch requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefetchProto
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp b/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp
index 1b6b6692b68e02a2ccc20f5d2c95994136b22fde..ba6d70d0aec4a8b28a02c1d222b7f5ba8fa072c5 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp
@@ -76,6 +76,8 @@ void HTMLResourcePreloader::preload(std::unique_ptr<PreloadRequest> preload, con
return;
if (preload->resourceType() == Resource::Script || preload->resourceType() == Resource::CSSStyleSheet || preload->resourceType() == Resource::ImportResource)
request.setCharset(preload->charset().isEmpty() ? m_document->characterSet().getString() : preload->charset());
+ if (m_document->isPrefetchOnly())
+ request.setLinkPreload(true);
request.setForPreload(true, preload->discoveryTime());
int duration = static_cast<int>(1000 * (monotonicallyIncreasingTime() - preload->discoveryTime()));
DEFINE_STATIC_LOCAL(CustomCountHistogram, preloadDelayHistogram, ("WebCore.PreloadDelayMs", 0, 2000, 20));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698