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

Unified Diff: content/browser/service_worker/service_worker_context_wrapper.cc

Issue 2610163002: PaymentApp: Implement InvokePaymentApp() in browser side. (Closed)
Patch Set: PaymentApp: Implement InvokePaymentApp() in content/browser side. Created 3 years, 11 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/service_worker/service_worker_context_wrapper.cc
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index 6c5881189fa43ed89a803e5713a44b2945f2cf9e..1544b180a814d3685fe54913b4e554c934349810 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -711,6 +711,21 @@ void ServiceWorkerContextWrapper::FindReadyRegistrationForId(
this, callback));
}
+void ServiceWorkerContextWrapper::FindReadyRegistrationForIdOnly(
+ int64_t registration_id,
+ const FindRegistrationCallback& callback) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+ if (!context_core_) {
+ // FindRegistrationForId() can run the callback synchronously.
nhiroki 2017/01/12 03:12:37 ForIdOnly()
zino 2017/01/13 16:41:11 Done.
+ callback.Run(SERVICE_WORKER_ERROR_ABORT, nullptr);
+ return;
+ }
+ context_core_->storage()->FindRegistrationForIdOnly(
+ registration_id,
+ base::Bind(&ServiceWorkerContextWrapper::DidFindRegistrationForFindReady,
+ this, callback));
+}
+
void ServiceWorkerContextWrapper::DidFindRegistrationForFindReady(
const FindRegistrationCallback& callback,
ServiceWorkerStatusCode status,

Powered by Google App Engine
This is Rietveld 408576698