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

Unified Diff: content/child/background_sync/background_sync_provider_thread_proxy.cc

Issue 1344843003: [BackgroundSync] Add browser side support for SyncRegistration.done (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ncn_max
Patch Set: Address comments from PS7 Created 5 years, 3 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/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) {
+ 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&
« no previous file with comments | « content/child/background_sync/background_sync_provider_thread_proxy.h ('k') | content/common/background_sync_service.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698