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, |