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

Unified Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 153983004: Schedule image resource downloads by decreasing visual impact - Blink Side (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changes from review. Created 6 years, 10 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: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index 82348ae92f3238fcc4c8c64d8a91b89f861101d2..a8995c660d484e8ef183ed6abbe5840b207bbaf5 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -645,7 +645,7 @@ ResourcePtr<Resource> ResourceFetcher::requestResource(Resource::Type type, Fetc
ResourceLoadPriority priority = loadPriority(type, request);
if (priority != resource->resourceRequest().priority()) {
resource->resourceRequest().setPriority(priority);
- resource->didChangePriority(priority);
+ resource->didChangePriority(priority, 0);
}
}
@@ -1209,10 +1209,10 @@ void ResourceFetcher::didFinishLoading(const Resource* resource, double finishTi
context().dispatchDidFinishLoading(m_documentLoader, resource->identifier(), finishTime);
}
-void ResourceFetcher::didChangeLoadingPriority(const Resource* resource, ResourceLoadPriority loadPriority)
+void ResourceFetcher::didChangeLoadingPriority(const Resource* resource, ResourceLoadPriority loadPriority, int intraPriorityValue)
{
TRACE_EVENT_ASYNC_STEP_INTO1("net", "Resource", resource, "ChangePriority", "priority", loadPriority);
- context().dispatchDidChangeResourcePriority(resource->identifier(), loadPriority);
+ context().dispatchDidChangeResourcePriority(resource->identifier(), loadPriority, intraPriorityValue);
}
void ResourceFetcher::didFailLoading(const Resource* resource, const ResourceError& error)

Powered by Google App Engine
This is Rietveld 408576698