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

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

Issue 1283273002: Service Worker: Change last update check location and HTTP cache bypass rule (2/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comments. Created 5 years, 3 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_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 16a192858271e92bc9532362686253dc9bb308fb..60a8e4d450c81304b4e8bdff4f2357b0b138aa3e 100644
--- a/content/browser/service_worker/service_worker_register_job.cc
+++ b/content/browser/service_worker/service_worker_register_job.cc
@@ -344,16 +344,6 @@ void ServiceWorkerRegisterJob::OnStartWorkerFinished(
// The updated worker is identical to the incumbent.
if (status == SERVICE_WORKER_ERROR_EXISTS) {
- // Only bump the last check time when we've bypassed the browser cache.
- base::TimeDelta time_since_last_check =
- base::Time::Now() - registration()->last_update_check();
- if (time_since_last_check > base::TimeDelta::FromHours(
- kServiceWorkerScriptMaxCacheAgeInHours) ||
- new_version()->force_bypass_cache_for_scripts()) {
- registration()->set_last_update_check(base::Time::Now());
- context_->storage()->UpdateLastUpdateCheckTime(registration());
- }
-
ResolvePromise(SERVICE_WORKER_OK, std::string(), registration());
Complete(status, "The updated worker is identical to the incumbent.");
return;
@@ -418,7 +408,6 @@ void ServiceWorkerRegisterJob::OnInstallFinished(
}
SetPhase(STORE);
- registration()->set_last_update_check(base::Time::Now());
context_->storage()->StoreRegistration(
registration(),
new_version(),

Powered by Google App Engine
This is Rietveld 408576698