Index: content/browser/background_fetch/background_fetch_data_manager.h |
diff --git a/content/browser/background_fetch/background_fetch_data_manager.h b/content/browser/background_fetch/background_fetch_data_manager.h |
index ab17f484b294035ae86e61cab08e76cd929cb171..0de548e1ed7b219345f26fbfeb804f7381dc595c 100644 |
--- a/content/browser/background_fetch/background_fetch_data_manager.h |
+++ b/content/browser/background_fetch/background_fetch_data_manager.h |
@@ -33,9 +33,8 @@ class ChromeBlobStorageContext; |
// which will keep the metadata up to date. |
class CONTENT_EXPORT BackgroundFetchDataManager { |
public: |
- using CreateRegistrationCallback = base::OnceCallback<void( |
- blink::mojom::BackgroundFetchError, |
- std::vector<scoped_refptr<BackgroundFetchRequestInfo>>)>; |
+ using CreateRegistrationCallback = |
+ base::OnceCallback<void(blink::mojom::BackgroundFetchError)>; |
using DeleteRegistrationCallback = |
base::OnceCallback<void(blink::mojom::BackgroundFetchError)>; |
using NextRequestCallback = |
@@ -58,6 +57,11 @@ class CONTENT_EXPORT BackgroundFetchDataManager { |
const BackgroundFetchOptions& options, |
CreateRegistrationCallback callback); |
+ // Activates the next pending request, if any, such that it is ready to be |
+ // started, and invokes the |callback| with that request, else a null request. |
+ void ActivateNextRequest(const BackgroundFetchRegistrationId& registration_id, |
+ NextRequestCallback callback); |
Peter Beverloo
2017/07/11 16:10:55
I'm not a fan of "Activate". The JobController "st
johnme
2017/07/12 13:13:09
I've renamed this to PopNextRequest, since the key
|
+ |
// Marks that the |request|, part of the Background Fetch identified by |
// |registration_id|, has been started as |download_guid|. |
void MarkRequestAsStarted( |
@@ -68,7 +72,7 @@ class CONTENT_EXPORT BackgroundFetchDataManager { |
// Marks that the |request|, part of the Background Fetch identified by |
// |registration_id|, has completed. Will invoke the |callback| with the |
// next request, if any, when the operation has completed. |
- void MarkRequestAsCompleteAndGetNextRequest( |
+ void MarkRequestAsCompleteAndActivateNextRequest( |
const BackgroundFetchRegistrationId& registration_id, |
BackgroundFetchRequestInfo* request, |
NextRequestCallback callback); |