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

Unified Diff: content/browser/service_worker/service_worker_dispatcher_host.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: Do not store max-age to database. Created 5 years, 4 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_dispatcher_host.cc
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc
index 0e9f3c97f2bd3bd9ac021b6cb958b4903137f19e..4fc95d86a24bf91d68b3a0db154beef250ecdf29 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
@@ -435,10 +435,12 @@ void ServiceWorkerDispatcherHost::OnUpdateServiceWorker(int thread_id,
return;
}
- // The spec says, "update() pings the server for an updated version of this
- // script without consulting caches", so set |force_bypass_cache| to true.
+ // update() does not always bypass the browser cache. It obeys the same rule
+ // as other update attempts that bypasses the browser cache only when
+ // min(Cache-Control's max-age value, 86400) seconds have passed since the
+ // last update.
nhiroki 2015/08/24 07:57:51 Probably this comment should be moved to service_w
jungkees 2015/08/25 09:36:51 Agreed. I'll move the suggested comment to service
GetContext()->UpdateServiceWorker(
- registration, true, /* force_bypass_cache */
+ registration, false, /* force_bypass_cache */
provider_host, base::Bind(&ServiceWorkerDispatcherHost::UpdateComplete,
this, thread_id, provider_id, request_id));
}

Powered by Google App Engine
This is Rietveld 408576698