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

Unified Diff: components/offline_pages/background/request_coordinator.h

Issue 2178143002: Check time budget before starting new requests, and unittest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak time limit names Created 4 years, 5 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/background/request_coordinator.h
diff --git a/components/offline_pages/background/request_coordinator.h b/components/offline_pages/background/request_coordinator.h
index 4eaed65f522ba496429f45dc0bbe292ac182f3ce..c757702b01bace4e290c725600225bb70b7e3e28 100644
--- a/components/offline_pages/background/request_coordinator.h
+++ b/components/offline_pages/background/request_coordinator.h
@@ -135,10 +135,9 @@ class RequestCoordinator : public KeyedService {
bool is_busy_;
// True if the current request has been canceled.
bool is_canceled_;
- // How long to wait for an offliner request before giving up.
- base::TimeDelta offliner_timeout_;
// Unowned pointer to the current offliner, if any.
Offliner* offliner_;
+ base::Time operation_start_time_;
// Last known conditions for network, battery
std::unique_ptr<DeviceConditions> current_conditions_;
// RequestCoordinator takes over ownership of the policy
@@ -159,6 +158,8 @@ class RequestCoordinator : public KeyedService {
RequestCoordinatorEventLogger event_logger_;
// Timer to watch for pre-render attempts running too long.
base::OneShotTimer watchdog_timer_;
+ // How long to wait for an offliner request before giving up.
+ base::TimeDelta offliner_timeout_;
// Allows us to pass a weak pointer to callbacks.
base::WeakPtrFactory<RequestCoordinator> weak_ptr_factory_;
« no previous file with comments | « components/offline_pages/background/offliner_policy.h ('k') | components/offline_pages/background/request_coordinator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698