| 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 c523edb98a022d87dbf3a53c29f0681fcab5ead5..879ec94108bf47b76c074b9a12f50a781eb632aa 100644
|
| --- a/components/offline_pages/background/request_coordinator.h
|
| +++ b/components/offline_pages/background/request_coordinator.h
|
| @@ -137,6 +137,14 @@ class RequestCoordinator : public KeyedService,
|
| scheduler_callback_ = callback;
|
| }
|
|
|
| + // A way to set the callback which would be called if the request is an
|
| + // user-requested one. Used by testing harness to determine if a request has
|
| + // been processed.
|
| + void SetUserRequestCallbackForTest(
|
| + const base::Callback<void(bool)> callback) {
|
| + user_request_callback_ = callback;
|
| + }
|
| +
|
| // Observers implementing the RequestCoordinator::Observer interface can
|
| // register here to get notifications of changes to request state. This
|
| // pointer is not owned, and it is the callers responsibility to remove the
|
| @@ -367,6 +375,8 @@ class RequestCoordinator : public KeyedService,
|
| RequestCoordinatorEventLogger event_logger_;
|
| // Timer to watch for pre-render attempts running too long.
|
| base::OneShotTimer watchdog_timer_;
|
| + // Callback invoked when a user request is done (default empty).
|
| + base::Callback<void(bool)> user_request_callback_;
|
| // Allows us to pass a weak pointer to callbacks.
|
| base::WeakPtrFactory<RequestCoordinator> weak_ptr_factory_;
|
|
|
|
|