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

Unified Diff: content/browser/background_fetch/background_fetch_job_controller.h

Issue 2978603003: [Background Fetch] Tidy up getting/activating pending requests (Closed)
Patch Set: Address 2nd round review comments Created 3 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: content/browser/background_fetch/background_fetch_job_controller.h
diff --git a/content/browser/background_fetch/background_fetch_job_controller.h b/content/browser/background_fetch/background_fetch_job_controller.h
index 3698664c51d9d19b2bb36c5e9efedd7fb4a0306d..a944352b041bbf6bc98cc65b6f47a921e5d27cd9 100644
--- a/content/browser/background_fetch/background_fetch_job_controller.h
+++ b/content/browser/background_fetch/background_fetch_job_controller.h
@@ -48,10 +48,9 @@ class CONTENT_EXPORT BackgroundFetchJobController {
const net::NetworkTrafficAnnotationTag& traffic_annotation);
~BackgroundFetchJobController();
- // Starts fetching the |initial_fetches|. The controller will continue to
+ // Starts fetching the first few requests. The controller will continue to
// fetch new content until all requests have been handled.
- void Start(
- std::vector<scoped_refptr<BackgroundFetchRequestInfo>> initial_requests);
+ void Start();
// Updates the representation of this Background Fetch in the user interface
// to match the given |title|.
@@ -85,9 +84,8 @@ class CONTENT_EXPORT BackgroundFetchJobController {
// Called when the given |request| has been completed.
void DidCompleteRequest(scoped_refptr<BackgroundFetchRequestInfo> request);
- // Called when a completed download has been marked as such in the DataManager
- // and the next request, if any, has been read from storage.
- void DidGetNextRequest(scoped_refptr<BackgroundFetchRequestInfo> request);
+ // Called when a completed download has been marked as such in DataManager.
+ void DidMarkRequestCompleted(bool has_pending_or_active_requests);
// The registration id on behalf of which this controller is fetching data.
BackgroundFetchRegistrationId registration_id_;
@@ -106,9 +104,6 @@ class CONTENT_EXPORT BackgroundFetchJobController {
// will be kept alive until after the JobController is destroyed.
BackgroundFetchDataManager* data_manager_;
- // Number of outstanding acknowledgements we still expect to receive.
- int pending_completed_file_acknowledgements_ = 0;
-
// Callback for when all fetches have been completed.
CompletedCallback completed_callback_;

Powered by Google App Engine
This is Rietveld 408576698