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

Unified Diff: Source/modules/background_sync/SyncRegistration.cpp

Issue 1311053002: [BackgroundSync] Use appopriate type parameters for WebCallbacks (2/4) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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: Source/modules/background_sync/SyncRegistration.cpp
diff --git a/Source/modules/background_sync/SyncRegistration.cpp b/Source/modules/background_sync/SyncRegistration.cpp
index 64850cfa2435ec05ad3eccf30a4f1aa092d3a56a..21c3758cc624ec29cc5526875b038a3a2b71cc4a 100644
--- a/Source/modules/background_sync/SyncRegistration.cpp
+++ b/Source/modules/background_sync/SyncRegistration.cpp
@@ -27,16 +27,9 @@ SyncRegistration* SyncRegistration::create(const WebSyncRegistration& syncRegist
return new SyncRegistration(syncRegistration.id, options, serviceWorkerRegistration);
}
-SyncRegistration* SyncRegistration::take(ScriptPromiseResolver*, WebSyncRegistration* syncRegistration, ServiceWorkerRegistration* serviceWorkerRegistration)
+SyncRegistration* SyncRegistration::take(ScriptPromiseResolver*, PassOwnPtr<WebSyncRegistration> registration, ServiceWorkerRegistration* serviceWorkerRegistration)
{
- OwnPtr<WebSyncRegistration> registration = adoptPtr(syncRegistration);
- return create(*syncRegistration, serviceWorkerRegistration);
-}
-
-void SyncRegistration::dispose(WebSyncRegistration* syncRegistration)
-{
- if (syncRegistration)
- delete syncRegistration;
+ return create(*registration, serviceWorkerRegistration);
}
SyncRegistration::SyncRegistration(int64_t id, const SyncRegistrationOptions& options, ServiceWorkerRegistration* serviceWorkerRegistration)
« no previous file with comments | « Source/modules/background_sync/SyncRegistration.h ('k') | public/platform/modules/background_sync/WebSyncClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698