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

Unified Diff: content/browser/loader/resource_scheduler.cc

Issue 1117923004: Run load state update timer only when needed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cpu
Patch Set: Add comments Created 5 years, 7 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: content/browser/loader/resource_scheduler.cc
diff --git a/content/browser/loader/resource_scheduler.cc b/content/browser/loader/resource_scheduler.cc
index a3d3d649ac2dc1c51bc20774fc6f637c68759b99..ac5723233bc44a345e26dc45aacea8ebe928ea9a 100644
--- a/content/browser/loader/resource_scheduler.cc
+++ b/content/browser/loader/resource_scheduler.cc
@@ -1005,6 +1005,14 @@ bool ResourceScheduler::IsClientVisibleForTesting(int child_id, int route_id) {
return client->is_visible();
}
+bool ResourceScheduler::HasLoadingClients() const {
+ for (auto& client : client_map_) {
mmenke 2015/05/21 15:53:25 nit: const auto& client
Andre 2015/05/21 22:05:39 Done.
+ if (!client.second->is_loaded())
+ return true;
+ }
+ return false;
+}
+
ResourceScheduler::Client* ResourceScheduler::GetClient(int child_id,
int route_id) {
ClientId client_id = MakeClientId(child_id, route_id);

Powered by Google App Engine
This is Rietveld 408576698