Index: components/offline_pages/core/background/request_coordinator.h |
diff --git a/components/offline_pages/core/background/request_coordinator.h b/components/offline_pages/core/background/request_coordinator.h |
index 770cae3a8f1cd7595a44091e120efbc01741d914..86d6d0418639780327d54cd6411aad977a72e9a3 100644 |
--- a/components/offline_pages/core/background/request_coordinator.h |
+++ b/components/offline_pages/core/background/request_coordinator.h |
@@ -452,6 +452,16 @@ class RequestCoordinator : public KeyedService, |
base::OneShotTimer watchdog_timer_; |
// Used for potential immediate processing when we get network connection. |
std::unique_ptr<ConnectionNotifier> connection_notifier_; |
+ // Used to track whether we have a prioritized request. |
fgorski
2017/03/08 17:33:24
s/whether we have a//
s/request/requests/
romax
2017/03/08 21:43:58
Done.
|
+ // The elements can only be added by RC when there're resumed request and |
fgorski
2017/03/08 17:33:24
s/request//
s/elements/requests/
s/there're/they a
romax
2017/03/08 21:43:58
Done.
|
+ // there are two places where deletion from the deque would happen: |
fgorski
2017/03/08 17:33:24
s/deque/prioritized_request_/
romax
2017/03/08 21:43:58
Done.
|
+ // 1. When there are paused requests, RC will remove the corresponding |
fgorski
2017/03/08 17:33:24
1. When request is paused RC will remove it.
2. Wh
romax
2017/03/08 21:43:58
Done.
|
+ // requests from the deque. |
+ // 2. In PickRequestTask created in PickNextRequest, if a request has the |
+ // highest priority but it doesn't exist in the request queue (it may be |
+ // completed or cancelled), the task will remove the request and look for |
+ // the next valid request. |
+ std::deque<int64_t> prioritized_requests_; |
fgorski
2017/03/08 17:33:24
Add comment about whether this is a FIFO or LIFO a
romax
2017/03/08 21:43:58
Done.
|
// Allows us to pass a weak pointer to callbacks. |
base::WeakPtrFactory<RequestCoordinator> weak_ptr_factory_; |