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

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

Issue 1282013004: BackgroundSyncManager tracks client registrations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up Created 5 years, 4 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 97466b23bf18dc84ee0787d8d4c817ea9fda156a..ace2ab2564a35e88f23ae66e6df94f968328675f 100644
--- a/content/child/background_sync/background_sync_provider_thread_proxy.cc
+++ b/content/child/background_sync/background_sync_provider_thread_proxy.cc
@@ -176,6 +176,19 @@ void BackgroundSyncProviderThreadProxy::getPermissionStatus(
WorkerTaskRunner::Instance()->CurrentWorkerId())));
}
+void BackgroundSyncProviderThreadProxy::trackRegistration(
michaeln 2015/08/21 02:39:25 adoptRegistrationHandle(handle_id)
jkarlin 2015/08/25 17:32:58 Changed to "GetRegistrationForHandleId" as it now
+ blink::WebSyncRegistration* registration) {
+ main_thread_task_runner_->PostTask(
+ FROM_HERE, base::Bind(&BackgroundSyncProvider::trackRegistration,
+ base::Unretained(sync_provider_), registration));
michaeln 2015/08/21 02:39:25 it'd be good to indicate xfer of ownership of |reg
jkarlin 2015/08/25 17:32:58 OBE. The new method takes a HandleId.
+}
+
+void BackgroundSyncProviderThreadProxy::releaseRegistration(int64_t sync_id) {
michaeln 2015/08/21 02:39:25 releaseRegistrationHandle(handle_id)
jkarlin 2015/08/25 17:32:58 Changed sync_id to handle_id. Added a TODO to upda
+ main_thread_task_runner_->PostTask(
+ FROM_HERE, base::Bind(&BackgroundSyncProvider::releaseRegistration,
+ base::Unretained(sync_provider_), sync_id));
+}
+
void BackgroundSyncProviderThreadProxy::OnWorkerRunLoopStopped() {
delete this;
}

Powered by Google App Engine
This is Rietveld 408576698