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

Unified Diff: third_party/WebKit/Source/modules/background_sync/SyncCallbacks.cpp

Issue 1437883002: [Background Sync] Align exposed API with spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src@remove-periodic
Patch Set: Rebase Created 5 years, 1 month 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: third_party/WebKit/Source/modules/background_sync/SyncCallbacks.cpp
diff --git a/third_party/WebKit/Source/modules/background_sync/SyncCallbacks.cpp b/third_party/WebKit/Source/modules/background_sync/SyncCallbacks.cpp
index c0cd78e2147e25497f745ea0b814a96707589e34..9f31ab12f822b414ca655d4da46fc0b9efe03a60 100644
--- a/third_party/WebKit/Source/modules/background_sync/SyncCallbacks.cpp
+++ b/third_party/WebKit/Source/modules/background_sync/SyncCallbacks.cpp
@@ -120,20 +120,14 @@ SyncGetRegistrationsCallbacks::~SyncGetRegistrationsCallbacks()
void SyncGetRegistrationsCallbacks::onSuccess(const WebVector<WebSyncRegistration*>& webSyncRegistrations)
{
- Vector<OwnPtr<WebSyncRegistration>> registrations;
- for (WebSyncRegistration* r : webSyncRegistrations) {
- registrations.append(adoptPtr(r));
- }
if (!m_resolver->executionContext() || m_resolver->executionContext()->activeDOMObjectsAreStopped()) {
return;
}
-
- HeapVector<Member<SyncRegistration>> syncRegistrations;
- for (auto& r : registrations) {
- SyncRegistration* reg = SyncRegistration::take(m_resolver.get(), r.release(), m_serviceWorkerRegistration);
- syncRegistrations.append(reg);
+ Vector<String> tags;
+ for (const WebSyncRegistration* r : webSyncRegistrations) {
+ tags.append(r->tag);
}
- m_resolver->resolve(syncRegistrations);
+ m_resolver->resolve(tags);
}
void SyncGetRegistrationsCallbacks::onError(const WebSyncError& error)
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | third_party/WebKit/Source/modules/background_sync/SyncEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698