| Index: content/browser/service_worker/service_worker_storage.cc
|
| diff --git a/content/browser/service_worker/service_worker_storage.cc b/content/browser/service_worker/service_worker_storage.cc
|
| index 0be7089ef05ccfe24f508a91810de7bfa20c3648..debf67268a2be58a6fe7cea485997b76c6b0ec80 100644
|
| --- a/content/browser/service_worker/service_worker_storage.cc
|
| +++ b/content/browser/service_worker/service_worker_storage.cc
|
| @@ -81,6 +81,24 @@ void ServiceWorkerStorage::FindRegistrationForDocument(
|
| RunSoon(base::Bind(callback, status, found));
|
| }
|
|
|
| +void ServiceWorkerStorage::FindRegistrationForId(
|
| + int64 registration_id,
|
| + const FindRegistrationCallback& callback) {
|
| + ServiceWorkerStatusCode status = SERVICE_WORKER_ERROR_NOT_FOUND;
|
| + scoped_refptr<ServiceWorkerRegistration> found;
|
| + for (PatternToRegistrationMap::const_iterator it =
|
| + registration_by_pattern_.begin();
|
| + it != registration_by_pattern_.end();
|
| + ++it) {
|
| + if (registration_id == it->second->id()) {
|
| + status = SERVICE_WORKER_OK;
|
| + found = it->second;
|
| + break;
|
| + }
|
| + }
|
| + RunSoon(base::Bind(callback, status, found));
|
| +}
|
| +
|
| void ServiceWorkerStorage::StoreRegistration(
|
| ServiceWorkerRegistration* registration,
|
| const StatusCallback& callback) {
|
|
|