| 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 a6dfc65bf78c7db17c1be21ad27782dfc729e133..21f3dcd0d3790a440166a6284f8c338c0cd3092e 100644
|
| --- a/content/browser/background_fetch/background_fetch_context.cc
|
| +++ b/content/browser/background_fetch/background_fetch_context.cc
|
| @@ -55,24 +55,25 @@ void BackgroundFetchContext::ShutdownOnIO() {
|
| }
|
|
|
| void BackgroundFetchContext::CreateRequest(
|
| - const BackgroundFetchJobInfo& job_info,
|
| + std::unique_ptr<BackgroundFetchJobInfo> job_info,
|
| std::vector<BackgroundFetchRequestInfo>& request_infos) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| DCHECK_GE(1U, request_infos.size());
|
|
|
| // Inform the data manager about the new download.
|
| + const std::string job_guid = job_info->guid();
|
| std::unique_ptr<BackgroundFetchJobData> job_data =
|
| - background_fetch_data_manager_.CreateRequest(job_info, request_infos);
|
| + background_fetch_data_manager_.CreateRequest(std::move(job_info),
|
| + request_infos);
|
|
|
| // If job_data is null, the DataManager will have logged an error.
|
| if (job_data) {
|
| // Create a controller which drives the processing of the job. It will use
|
| // the JobData to get information about individual requests for the job.
|
| - job_map_[job_info.guid()] = base::MakeUnique<BackgroundFetchJobController>(
|
| - job_info.guid(), browser_context_, storage_partition_,
|
| - std::move(job_data),
|
| + job_map_[job_guid] = base::MakeUnique<BackgroundFetchJobController>(
|
| + job_guid, browser_context_, storage_partition_, std::move(job_data),
|
| base::BindOnce(&BackgroundFetchContext::DidCompleteJob, this,
|
| - job_info.guid()));
|
| + job_guid));
|
| }
|
| }
|
|
|
|
|