Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: content/browser/background_sync/background_sync_manager.cc

Issue 1230213004: [Background Sync] Sent sync registration details to worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bgsync-event-mek
Patch Set: Remove const ref from mojo StructPtr (with rebase) Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 7903aa462a6e6c396061bdcd67dd5f7afe5db58f..7bd3ddf3bb1b1f0306420d571582a1672fa1d299 100644
--- a/content/browser/background_sync/background_sync_manager.cc
+++ b/content/browser/background_sync/background_sync_manager.cc
@@ -582,11 +582,13 @@ void BackgroundSyncManager::GetDataFromBackend(
}
void BackgroundSyncManager::FireOneShotSync(
+ const 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(
@@ -844,8 +846,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,

Powered by Google App Engine
This is Rietveld 408576698