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

Unified Diff: components/offline_pages/core/background/request_coordinator.cc

Issue 2857063002: Add a way to send the resource percentage signal to the RC. (Closed)
Patch Set: CR feedback, fix unit test. Created 3 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: components/offline_pages/core/background/request_coordinator.cc
diff --git a/components/offline_pages/core/background/request_coordinator.cc b/components/offline_pages/core/background/request_coordinator.cc
index 78cbccf1ffb625e08f1e9716245789f687330f6b..ab2ef6753cb3c7436178b63b0a5be1e6853f4418 100644
--- a/components/offline_pages/core/background/request_coordinator.cc
+++ b/components/offline_pages/core/background/request_coordinator.cc
@@ -1077,6 +1077,15 @@ const Scheduler::TriggerConditions RequestCoordinator::GetTriggerConditions(
policy_->UnmeteredNetworkRequired(user_requested));
}
+void RequestCoordinator::ObserveResourceTracking(const ResourceDataType type,
+ int64_t started_count,
+ int64_t completed_count) {
+ if (state_ != RequestCoordinatorState::OFFLINING)
+ return;
+
+ offliner_->ObserveResourceTracking(type, started_count, completed_count);
+}
+
void RequestCoordinator::AddObserver(Observer* observer) {
DCHECK(observer);
observers_.AddObserver(observer);

Powered by Google App Engine
This is Rietveld 408576698