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

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: Make sure we don't send notifications unless we are offlining 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..4a97bad700ca43d6986a17d91a5f5651cd7b5bb9 100644
--- a/components/offline_pages/core/background/request_coordinator.cc
+++ b/components/offline_pages/core/background/request_coordinator.cc
@@ -1077,6 +1077,14 @@ 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