Chromium Code Reviews| 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 d04ba515fa9f00c1a7fbfb41365a4431db9924a5..37c458b59705957261512b5e41a5e7b6411b1961 100644 |
| --- a/components/offline_pages/background/request_coordinator.h |
| +++ b/components/offline_pages/background/request_coordinator.h |
| @@ -81,6 +81,12 @@ class RequestCoordinator : public KeyedService { |
| return is_busy_; |
| } |
| + // Tracks whether the last prerender attempt got canceled. This is reset by |
|
dougarnett
2016/06/23 18:14:33
"prerender" => "processing" or "offlining"
Pete Williamson
2016/06/23 18:24:19
Done.
|
| + // the next StartProcessing() call. |
| + bool is_canceled() { |
| + return is_canceled_; |
| + } |
| + |
| private: |
| void AddRequestResultCallback(RequestQueue::AddRequestResult result, |
| const SavePageRequest& request); |
| @@ -102,12 +108,20 @@ class RequestCoordinator : public KeyedService { |
| void TryNextRequest(); |
| + // Returns the appropriate offliner to use, getting a new one from the factory |
| + // if needed. |
| + void GetOffliner(); |
| + |
| friend class RequestCoordinatorTest; |
| // The offliner can only handle one request at a time - if the offliner is |
| // busy, prevent other requests. This flag marks whether the offliner is in |
| // use. |
| bool is_busy_; |
| + // True if a prerender request has been canceled. |
|
dougarnett
2016/06/23 18:14:33
"prerender request" => "current request" ? or "pro
Pete Williamson
2016/06/23 18:24:19
Done.
|
| + bool is_canceled_; |
| + // Unowned pointer to the current offliner, if any. |
| + Offliner* offliner_; |
| // RequestCoordinator takes over ownership of the policy |
| std::unique_ptr<OfflinerPolicy> policy_; |
| // OfflinerFactory. Used to create offline pages. Owned. |