Chromium Code Reviews| Index: content/child/background_sync/background_sync_provider_thread_proxy.cc |
| diff --git a/content/child/background_sync/background_sync_provider_thread_proxy.cc b/content/child/background_sync/background_sync_provider_thread_proxy.cc |
| index cc8846cc22df8691cf6e301878bc49bcbf35c199..b3013c484b922429d42a76a193e572f613a34e68 100644 |
| --- a/content/child/background_sync/background_sync_provider_thread_proxy.cc |
| +++ b/content/child/background_sync/background_sync_provider_thread_proxy.cc |
| @@ -211,6 +211,20 @@ void BackgroundSyncProviderThreadProxy::releaseRegistration(int64_t handle_id) { |
| base::Unretained(sync_provider_), handle_id)); |
| } |
| +void BackgroundSyncProviderThreadProxy::notifyWhenDone( |
| + int64_t handle_id, |
| + blink::WebSyncNotifyWhenDoneCallbacks* callbacks) { |
|
michaeln
2015/09/17 21:44:12
I'm very wary of the thread affinity all blink::We
jkarlin
2015/09/18 12:03:20
Yes, good catch. chasej@ is making good headway in
michaeln
2015/09/18 19:18:52
Glad to hear that. I hope it helps to establish sa
|
| + DCHECK(callbacks); |
| + |
| + main_thread_task_runner_->PostTask( |
| + FROM_HERE, |
| + base::Bind( |
| + &BackgroundSyncProvider::notifyWhenDone, |
| + base::Unretained(sync_provider_), handle_id, |
| + new CallbackThreadAdapter<blink::WebSyncNotifyWhenDoneCallbacks>( |
| + make_scoped_ptr(callbacks), WorkerThread::GetCurrentId()))); |
| +} |
| + |
| void BackgroundSyncProviderThreadProxy::DuplicateRegistrationHandle( |
| int64 handle_id, |
| const BackgroundSyncService::DuplicateRegistrationHandleCallback& |