| Index: content/browser/background_fetch/background_fetch_context.cc
|
| diff --git a/content/browser/background_fetch/background_fetch_context.cc b/content/browser/background_fetch/background_fetch_context.cc
|
| index 90972e5578c109db4b8f3cd215cdabaa2af44649..6d3e8f5cecf4239e42e2fed9dbbba2f0a46fd8ec 100644
|
| --- a/content/browser/background_fetch/background_fetch_context.cc
|
| +++ b/content/browser/background_fetch/background_fetch_context.cc
|
| @@ -59,14 +59,15 @@ void BackgroundFetchContext::DidCreateRegistration(
|
| const BackgroundFetchRegistrationId& registration_id,
|
| const BackgroundFetchOptions& options,
|
| const blink::mojom::BackgroundFetchService::FetchCallback& callback,
|
| - blink::mojom::BackgroundFetchError error) {
|
| + blink::mojom::BackgroundFetchError error,
|
| + std::vector<BackgroundFetchRequestInfo> initial_requests) {
|
| if (error != blink::mojom::BackgroundFetchError::NONE) {
|
| callback.Run(error, base::nullopt /* registration */);
|
| return;
|
| }
|
|
|
| // Create the BackgroundFetchJobController, which will do the actual fetching.
|
| - CreateController(registration_id, options);
|
| + CreateController(registration_id, options, std::move(initial_requests));
|
|
|
| // Create the BackgroundFetchRegistration the renderer process will receive,
|
| // which enables it to resolve the promise telling the developer it worked.
|
| @@ -118,13 +119,16 @@ BackgroundFetchJobController* BackgroundFetchContext::GetActiveFetch(
|
|
|
| void BackgroundFetchContext::CreateController(
|
| const BackgroundFetchRegistrationId& registration_id,
|
| - const BackgroundFetchOptions& options) {
|
| + const BackgroundFetchOptions& options,
|
| + std::vector<BackgroundFetchRequestInfo> initial_requests) {
|
| std::unique_ptr<BackgroundFetchJobController> controller =
|
| base::MakeUnique<BackgroundFetchJobController>(
|
| registration_id, options, browser_context_, storage_partition_,
|
| background_fetch_data_manager_.get(),
|
| base::BindOnce(&BackgroundFetchContext::DidCompleteJob, this));
|
|
|
| + // TODO(peter): Start actually fetching the files.
|
| +
|
| active_fetches_.insert(
|
| std::make_pair(registration_id, std::move(controller)));
|
| }
|
|
|