Chromium Code Reviews| Index: content/child/background_sync/background_sync_provider.cc |
| diff --git a/content/child/background_sync/background_sync_provider.cc b/content/child/background_sync/background_sync_provider.cc |
| index bbe67d505b2797bf8eb19abbd3ae0c74b28d689b..f60d1777fd4cfe9530c19e1fe8941ae0950e0db9 100644 |
| --- a/content/child/background_sync/background_sync_provider.cc |
| +++ b/content/child/background_sync/background_sync_provider.cc |
| @@ -58,6 +58,7 @@ void BackgroundSyncProvider::registerBackgroundSync( |
| base::Unretained(this), base::Passed(callbacksPtr.Pass()))); |
| } |
| +// TODO(jkarlin) remove |tag| parameter. |
| void BackgroundSyncProvider::unregisterBackgroundSync( |
| blink::WebSyncRegistration::Periodicity periodicity, |
| int64_t id, |
| @@ -73,7 +74,7 @@ void BackgroundSyncProvider::unregisterBackgroundSync( |
| // base::Unretained is safe here, as the mojo channel will be deleted (and |
| // will wipe its callbacks) before 'this' is deleted. |
| GetBackgroundSyncServicePtr()->Unregister( |
| - mojo::ConvertTo<BackgroundSyncPeriodicity>(periodicity), id, tag.utf8(), |
| + mojo::ConvertTo<BackgroundSyncPeriodicity>(periodicity), id, |
| service_worker_registration_id, |
| base::Bind(&BackgroundSyncProvider::UnregisterCallback, |
| base::Unretained(this), base::Passed(callbacksPtr.Pass()))); |
| @@ -138,6 +139,17 @@ void BackgroundSyncProvider::getPermissionStatus( |
| base::Unretained(this), base::Passed(callbacksPtr.Pass()))); |
| } |
| +void BackgroundSyncProvider::trackRegistration( |
| + blink::WebSyncRegistration* registration) { |
| + scoped_ptr<blink::WebSyncRegistration> scoped_registration(registration); |
|
michaeln
2015/08/21 02:39:24
is WebSyncRegistration thread safe?
no, it has a
jkarlin
2015/08/25 17:32:58
Good catch. This function is gone now but this is
|
| + GetBackgroundSyncServicePtr()->TrackRegistration( |
| + mojo::ConvertTo<SyncRegistrationPtr>(*registration)); |
| +} |
| + |
| +void BackgroundSyncProvider::releaseRegistration(int64_t sync_id) { |
| + GetBackgroundSyncServicePtr()->ReleaseRegistration(sync_id); |
| +} |
| + |
| void BackgroundSyncProvider::RegisterCallback( |
| scoped_ptr<blink::WebSyncRegistrationCallbacks> callbacks, |
| BackgroundSyncError error, |