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

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

Issue 322003004: ServiceWorker: Fill waiting version if stored data is not active (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 eea2a4368ce27e6230b9912b75b323de1b39c90b..8a924e0c723b55e367e3a52035687cc063da8010 100644
--- a/content/browser/service_worker/service_worker_storage.cc
+++ b/content/browser/service_worker/service_worker_storage.cc
@@ -593,13 +593,18 @@ void ServiceWorkerStorage::DidGetAllRegistrations(
info.active_version = version->GetInfo();
else
info.waiting_version = version->GetInfo();
- } else {
+ infos.push_back(info);
+ continue;
+ }
+
+ if (it->is_active) {
info.active_version.is_null = false;
- if (it->is_active)
- info.active_version.status = ServiceWorkerVersion::ACTIVE;
- else
- info.active_version.status = ServiceWorkerVersion::INSTALLED;
+ info.active_version.status = ServiceWorkerVersion::ACTIVE;
info.active_version.version_id = it->version_id;
+ } else {
+ info.waiting_version.is_null = false;
+ info.waiting_version.status = ServiceWorkerVersion::INSTALLED;
+ info.waiting_version.version_id = it->version_id;
}
infos.push_back(info);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698