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

Unified Diff: content/browser/background_sync/background_sync_registration_handle.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/browser/background_sync/background_sync_registration_handle.cc
diff --git a/content/browser/background_sync/background_sync_registration_handle.cc b/content/browser/background_sync/background_sync_registration_handle.cc
index ff89cca60f8b55082d2c79657c22e971248f40d8..4e5e8e809fea97970bf9fa821208d5ce60cfc572 100644
--- a/content/browser/background_sync/background_sync_registration_handle.cc
+++ b/content/browser/background_sync/background_sync_registration_handle.cc
@@ -26,6 +26,15 @@ void BackgroundSyncRegistrationHandle::Unregister(
sw_registration_id, options()->periodicity, handle_id_, callback);
}
+void BackgroundSyncRegistrationHandle::NotifyWhenDone(
+ const StatusAndStateCallback& callback) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+ DCHECK(IsValid());
+ DCHECK(background_sync_manager_);
+
+ background_sync_manager_->NotifyWhenDone(handle_id_, callback);
+}
+
bool BackgroundSyncRegistrationHandle::IsValid() const {
return registration_ != nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698