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

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

Issue 2115393002: service worker: Refactor OnNoControllees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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_registration.cc
diff --git a/content/browser/service_worker/service_worker_registration.cc b/content/browser/service_worker/service_worker_registration.cc
index bad9920756875f7466faaebe8ad5b0867f13f9a9..cfd1e5e6e0d9554e6d069da150e3b52d4c66c3bd 100644
--- a/content/browser/service_worker/service_worker_registration.cc
+++ b/content/browser/service_worker/service_worker_registration.cc
@@ -255,8 +255,6 @@ void ServiceWorkerRegistration::OnNoControllees(ServiceWorkerVersion* version) {
Clear();
else if (should_activate_when_ready_)
ActivateWaitingVersion(true);
- is_uninstalling_ = false;
- should_activate_when_ready_ = false;
}
void ServiceWorkerRegistration::ActivateWaitingVersion(bool delay) {
@@ -432,6 +430,7 @@ void ServiceWorkerRegistration::OnDeleteFinished(
void ServiceWorkerRegistration::Clear() {
nhiroki 2016/07/04 07:53:38 How about checking pre-conditions before flipping
falken 2016/07/04 08:14:37 Unfortunately I'm not 100% sure those hold. Since
nhiroki 2016/07/04 08:39:05 Acknowledged.
is_uninstalling_ = false;
is_uninstalled_ = true;
+ should_activate_when_ready_ = false;
if (context_)
context_->storage()->NotifyDoneUninstallingRegistration(this);
« 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