| 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 2e087b26459a85969ffd42e8672c0b682521e638..e422bda9613e8656e8129b2989319c894455101d 100644
|
| --- a/content/browser/background_fetch/background_fetch_context.cc
|
| +++ b/content/browser/background_fetch/background_fetch_context.cc
|
| @@ -45,7 +45,8 @@ BackgroundFetchContext::BackgroundFetchContext(
|
| base::MakeUnique<BackgroundFetchDataManager>(browser_context)),
|
| event_dispatcher_(base::MakeUnique<BackgroundFetchEventDispatcher>(
|
| std::move(service_worker_context))),
|
| - client_proxy_(base::MakeUnique<BackgroundFetchClientProxy>(this)) {
|
| + client_proxy_(
|
| + base::MakeUnique<BackgroundFetchClientProxy>(browser_context, this)) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| BackgroundFetchClient* background_fetch_client =
|
| browser_context_->GetBackgroundFetchClient();
|
| @@ -103,6 +104,11 @@ void BackgroundFetchContext::DidCreateRegistration(
|
| // Create the BackgroundFetchJobController, which will do the actual fetching.
|
| CreateController(registration_id, options, std::move(initial_requests));
|
|
|
| + // Tell the BackgroundFetchClient that a job has started, which will allow
|
| + // embedders to display updates.
|
| + client_proxy_->AddDownload(GURL(registration_id.origin().Serialize()),
|
| + registration_id.Serialize(), options);
|
| +
|
| // Create the BackgroundFetchRegistration the renderer process will receive,
|
| // which enables it to resolve the promise telling the developer it worked.
|
| BackgroundFetchRegistration registration;
|
|
|