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

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp

Issue 2564363002: ServiceWorker: Replace RegistrationCallback and GetRegistrationsCallback with CallbackPromiseAdapter (Closed)
Patch Set: base::MakeUnique Created 4 years 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/serviceworkers/ServiceWorkerRegistration.cpp
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
index 60c26b45a6df32840b18b3348887dd68b2149200..c4cfde4b517f76842ff9ad9f2f802ffdb8c07844 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
@@ -21,6 +21,12 @@
namespace blink {
+ServiceWorkerRegistration* ServiceWorkerRegistration::take(
+ ScriptPromiseResolver* resolver,
+ std::unique_ptr<WebServiceWorkerRegistration::Handle> handle) {
+ return getOrCreate(resolver->getExecutionContext(), std::move(handle));
+}
+
bool ServiceWorkerRegistration::hasPendingActivity() const {
return !m_stopped;
}

Powered by Google App Engine
This is Rietveld 408576698