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 686e5ea57d812ca1b2461f4a348a9b5a95ed8a02..2efa24e3b7675ba776318b8c845c1e922f016710 100644 |
--- a/content/browser/service_worker/service_worker_context_wrapper.cc |
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc |
@@ -681,6 +681,20 @@ void ServiceWorkerContextWrapper::FindReadyRegistrationForDocument( |
this, callback)); |
} |
+void ServiceWorkerContextWrapper::FindReadyRegistrationForPattern( |
+ const GURL& scope, |
+ const FindRegistrationCallback& callback) { |
+ DCHECK_CURRENTLY_ON(BrowserThread::IO); |
+ if (!context_core_) { |
+ callback.Run(SERVICE_WORKER_ERROR_ABORT, nullptr); |
nhiroki
2016/11/15 02:32:19
FindReadyRegistrationForPattern() should asynchron
zino
2016/11/15 17:57:37
Done.
|
+ return; |
+ } |
+ context_core_->storage()->FindRegistrationForPattern( |
+ net::SimplifyUrlForRequest(scope), |
+ base::Bind(&ServiceWorkerContextWrapper::DidFindRegistrationForFindReady, |
+ this, callback)); |
+} |
+ |
void ServiceWorkerContextWrapper::FindReadyRegistrationForId( |
int64_t registration_id, |
const GURL& origin, |