| Index: content/browser/background_sync/background_sync_manager.cc
|
| diff --git a/content/browser/background_sync/background_sync_manager.cc b/content/browser/background_sync/background_sync_manager.cc
|
| index a9226316ea34980666454c478c989db2a1430698..daa5c2043d69ade1b5132b9f5c8b4022fba3d88b 100644
|
| --- a/content/browser/background_sync/background_sync_manager.cc
|
| +++ b/content/browser/background_sync/background_sync_manager.cc
|
| @@ -534,11 +534,13 @@ void BackgroundSyncManager::GetDataFromBackend(
|
| }
|
|
|
| void BackgroundSyncManager::FireOneShotSync(
|
| + BackgroundSyncRegistration* registration,
|
| const scoped_refptr<ServiceWorkerVersion>& active_version,
|
| const ServiceWorkerVersion::StatusCallback& callback) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
|
|
| - active_version->DispatchSyncEvent(callback);
|
| + active_version->DispatchSyncEvent(
|
| + mojo::ConvertTo<SyncRegistrationPtr>(*registration), callback);
|
| }
|
|
|
| void BackgroundSyncManager::UnregisterImpl(
|
| @@ -775,8 +777,11 @@ void BackgroundSyncManager::FireReadyEventsDidFindRegistration(
|
| return;
|
| }
|
|
|
| + BackgroundSyncRegistration* registration =
|
| + LookupRegistration(service_worker_registration->id(), registration_key);
|
| +
|
| FireOneShotSync(
|
| - service_worker_registration->active_version(),
|
| + registration, service_worker_registration->active_version(),
|
| base::Bind(&BackgroundSyncManager::EventComplete,
|
| weak_ptr_factory_.GetWeakPtr(), service_worker_registration,
|
| service_worker_registration->id(), registration_key,
|
|
|