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

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

Issue 685503004: ServiceWorker: Remove the obsolete "parsed" state [2/3] (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « content/browser/service_worker/service_worker_handle.cc ('k') | 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_register_job.cc
diff --git a/content/browser/service_worker/service_worker_register_job.cc b/content/browser/service_worker/service_worker_register_job.cc
index 7d7a0bff96aea22de3ce92d0c1a51870482eca60..b68cd30f8199d6812f9ace3a66c4f1534cb5e43d 100644
--- a/content/browser/service_worker/service_worker_register_job.cc
+++ b/content/browser/service_worker/service_worker_register_job.cc
@@ -363,21 +363,21 @@ void ServiceWorkerRegisterJob::OnStartWorkerFinished(
void ServiceWorkerRegisterJob::InstallAndContinue() {
SetPhase(INSTALL);
- // "2. Set registration.installingWorker to worker."
+ // "Set registration.installingWorker to worker."
DCHECK(!registration()->installing_version());
registration()->SetInstallingVersion(new_version());
- // "3. Resolve promise with registration."
- ResolvePromise(SERVICE_WORKER_OK, registration());
-
- // "4. Run the [[UpdateState]] algorithm passing registration.installingWorker
- // and "installing" as the arguments."
+ // "Run the Update State algorithm passing registration's installing worker
+ // and installing as the arguments."
new_version()->SetStatus(ServiceWorkerVersion::INSTALLING);
- // "5. Fire a simple event named updatefound..."
+ // "Resolve registrationPromise with registration."
+ ResolvePromise(SERVICE_WORKER_OK, registration());
+
+ // "Fire a simple event named updatefound..."
registration()->NotifyUpdateFound();
- // "6. Fire an event named install..."
+ // "Fire an event named install..."
new_version()->DispatchInstallEvent(
-1,
base::Bind(&ServiceWorkerRegisterJob::OnInstallFinished,
« no previous file with comments | « content/browser/service_worker/service_worker_handle.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698