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

Side by Side Diff: components/offline_pages/background/request_coordinator.h

Issue 2282973003: [OfflinePages] Resuming a SavePageRequest now may start processing if network is connected. (Closed)
Patch Set: Added TODO for double loop Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/offline_pages/background/request_coordinator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_
6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_ 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 const RemoveRequestsCallback& callback, 179 const RemoveRequestsCallback& callback,
180 SavePageStatus status, 180 SavePageStatus status,
181 const RequestQueue::UpdateMultipleRequestResults& results, 181 const RequestQueue::UpdateMultipleRequestResults& results,
182 const std::vector<SavePageRequest>& requests); 182 const std::vector<SavePageRequest>& requests);
183 183
184 void HandleRemovedRequests( 184 void HandleRemovedRequests(
185 SavePageStatus status, 185 SavePageStatus status,
186 const RequestQueue::UpdateMultipleRequestResults& results, 186 const RequestQueue::UpdateMultipleRequestResults& results,
187 const std::vector<SavePageRequest>& requests); 187 const std::vector<SavePageRequest>& requests);
188 188
189 // Start processing now if connected (but with conservative assumption
190 // as to other device conditions).
191 void StartProcessingIfConnected();
192
189 // Callback from the request picker when it has chosen our next request. 193 // Callback from the request picker when it has chosen our next request.
190 void RequestPicked(const SavePageRequest& request); 194 void RequestPicked(const SavePageRequest& request);
191 195
192 // Callback from the request picker when no more requests are in the queue. 196 // Callback from the request picker when no more requests are in the queue.
193 void RequestQueueEmpty(); 197 void RequestQueueEmpty();
194 198
195 // Cancels an in progress pre-rendering, and updates state appropriately. 199 // Cancels an in progress pre-rendering, and updates state appropriately.
196 void StopPrerendering(); 200 void StopPrerendering();
197 201
198 void SendRequestToOffliner(const SavePageRequest& request); 202 void SendRequestToOffliner(const SavePageRequest& request);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 base::TimeDelta offliner_timeout_; 276 base::TimeDelta offliner_timeout_;
273 // Allows us to pass a weak pointer to callbacks. 277 // Allows us to pass a weak pointer to callbacks.
274 base::WeakPtrFactory<RequestCoordinator> weak_ptr_factory_; 278 base::WeakPtrFactory<RequestCoordinator> weak_ptr_factory_;
275 279
276 DISALLOW_COPY_AND_ASSIGN(RequestCoordinator); 280 DISALLOW_COPY_AND_ASSIGN(RequestCoordinator);
277 }; 281 };
278 282
279 } // namespace offline_pages 283 } // namespace offline_pages
280 284
281 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_ 285 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_COORDINATOR_H_
OLDNEW
« no previous file with comments | « no previous file | components/offline_pages/background/request_coordinator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698