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

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

Issue 822293003: ServiceWorker: remove kill in-progress jobs for update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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_job_coordinator.cc
diff --git a/content/browser/service_worker/service_worker_job_coordinator.cc b/content/browser/service_worker/service_worker_job_coordinator.cc
index 79c8228a460d9d0e439447bc6b5a24193fd82f30..13bd6ee8ff3ee960836793b75999baa9e39d27a9 100644
--- a/content/browser/service_worker/service_worker_job_coordinator.cc
+++ b/content/browser/service_worker/service_worker_job_coordinator.cc
@@ -12,9 +12,8 @@ namespace content {
namespace {
-bool IsRegisterOrUpdateJob(const ServiceWorkerRegisterJobBase& job) {
- return job.GetType() == ServiceWorkerRegisterJobBase::REGISTRATION_JOB ||
- job.GetType() == ServiceWorkerRegisterJobBase::UPDATE_JOB;
+bool IsRegisterJob(const ServiceWorkerRegisterJobBase& job) {
+ return job.GetType() == ServiceWorkerRegisterJobBase::REGISTRATION_JOB;
}
}
@@ -53,13 +52,13 @@ void ServiceWorkerJobCoordinator::JobQueue::Pop(
void ServiceWorkerJobCoordinator::JobQueue::DoomInstallingWorkerIfNeeded() {
DCHECK(!jobs_.empty());
- if (!IsRegisterOrUpdateJob(*jobs_.front()))
+ if (!IsRegisterJob(*jobs_.front()))
return;
ServiceWorkerRegisterJob* job =
static_cast<ServiceWorkerRegisterJob*>(jobs_.front());
std::deque<ServiceWorkerRegisterJobBase*>::iterator it = jobs_.begin();
for (++it; it != jobs_.end(); ++it) {
- if (IsRegisterOrUpdateJob(**it)) {
+ if (IsRegisterJob(**it)) {
job->DoomInstallingWorker();
return;
}
« 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