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

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: Turn off other metrics which might require tab helpers when background loading 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 034643e3f22c572c07c161ef3204587239fc2a6d..4128284a719a42631ad1a185f4ce8679c58bc679 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