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

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

Issue 188283003: Add ServiceWorkerVersion::status() (which is to be persisted unlike running status) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix after rebase Created 6 years, 9 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_registration.cc
diff --git a/content/browser/service_worker/service_worker_registration.cc b/content/browser/service_worker/service_worker_registration.cc
index e3a7e9597b40c9bddd14ccff7280eefea8818033..f774a32b578dc1369a13dde8d67a0466c94702b9 100644
--- a/content/browser/service_worker/service_worker_registration.cc
+++ b/content/browser/service_worker/service_worker_registration.cc
@@ -14,7 +14,6 @@ ServiceWorkerRegistration::ServiceWorkerRegistration(const GURL& pattern,
: pattern_(pattern),
script_url_(script_url),
registration_id_(registration_id),
- next_version_id_(0L),
is_shutdown_(false) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
}
@@ -36,8 +35,10 @@ void ServiceWorkerRegistration::Shutdown() {
}
void ServiceWorkerRegistration::ActivatePendingVersion() {
+ active_version_->set_status(ServiceWorkerVersion::DEACTIVATED);
active_version_->Shutdown();
active_version_ = pending_version_;
+ active_version_->set_status(ServiceWorkerVersion::ACTIVE);
pending_version_ = NULL;
}

Powered by Google App Engine
This is Rietveld 408576698