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

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

Issue 269373002: Store the service worker script and its imports on first load... kinda (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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_storage.cc
diff --git a/content/browser/service_worker/service_worker_storage.cc b/content/browser/service_worker/service_worker_storage.cc
index 942214179893fa855970349282cb0b5b8b7d8ac9..7754de29c39a7a3f5ccbcb29d0601bb45f80e54e 100644
--- a/content/browser/service_worker/service_worker_storage.cc
+++ b/content/browser/service_worker/service_worker_storage.cc
@@ -709,7 +709,8 @@ ServiceWorkerStorage::CreateRegistration(
context_->GetLiveVersion(data.version_id);
if (!version) {
version = new ServiceWorkerVersion(registration, data.version_id, context_);
- version->SetStatus(data.GetVersionStatus());
+ version->SetStatus(data.is_active ?
+ ServiceWorkerVersion::ACTIVE : ServiceWorkerVersion::INSTALLED);
}
if (version->status() == ServiceWorkerVersion::ACTIVE)

Powered by Google App Engine
This is Rietveld 408576698