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

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

Issue 717453002: Remove unnecessary methods and collapse function calls in the preloader code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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/core/html/parser/HTMLResourcePreloader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLResourcePreloader.cpp
diff --git a/Source/core/html/parser/HTMLResourcePreloader.cpp b/Source/core/html/parser/HTMLResourcePreloader.cpp
index 470d57d74ecb360ad717c5ac05d4d8f8738eda2c..075e5149ef0b45e9212b2415516df0ca7b08cf47 100644
--- a/Source/core/html/parser/HTMLResourcePreloader.cpp
+++ b/Source/core/html/parser/HTMLResourcePreloader.cpp
@@ -58,6 +58,9 @@ FetchRequest PreloadRequest::resourceRequest(Document* document)
if (m_isCORSEnabled)
request.setCrossOriginAccessControl(document->securityOrigin(), m_allowCredentials);
+
+ request.setDefer(m_defer);
+
return request;
}
@@ -88,7 +91,6 @@ void HTMLResourcePreloader::takeAndPreload(PreloadRequestStream& r)
void HTMLResourcePreloader::preload(PassOwnPtr<PreloadRequest> preload)
{
FetchRequest request = preload->resourceRequest(m_document);
- request.setDefer(preload->defer());
blink::Platform::current()->histogramCustomCounts("WebCore.PreloadDelayMs", static_cast<int>(1000 * (monotonicallyIncreasingTime() - preload->discoveryTime())), 0, 2000, 20);
m_document->fetcher()->preload(preload->resourceType(), request, preload->charset());
}
« no previous file with comments | « Source/core/html/parser/HTMLResourcePreloader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698