Index: content/browser/service_worker/service_worker_context_request_handler.cc |
diff --git a/content/browser/service_worker/service_worker_context_request_handler.cc b/content/browser/service_worker/service_worker_context_request_handler.cc |
index 364e41f751beaf928cc93d5cc3605488c981ab52..611dee845e3acfa6b98f89b3adc912aaf96b18b0 100644 |
--- a/content/browser/service_worker/service_worker_context_request_handler.cc |
+++ b/content/browser/service_worker/service_worker_context_request_handler.cc |
@@ -209,7 +209,13 @@ net::URLRequestJob* ServiceWorkerContextRequestHandler::MaybeCreateJobImpl( |
int extra_load_flags = 0; |
base::TimeDelta time_since_last_check = |
base::Time::Now() - registration->last_update_check(); |
- if (time_since_last_check > kServiceWorkerScriptMaxCacheAge || |
+ bool no_update_via_cache = |
nhiroki
2017/06/21 15:04:59
|no_update_via_cache| sounds a bit confusing. How
yuryu
2017/07/20 10:15:12
Done.
|
+ (is_main_script && registration->update_via_cache() != |
+ blink::WebServiceWorkerUpdateViaCache::kAll) || |
+ (!is_main_script && registration->update_via_cache() == |
nhiroki
2017/06/21 15:04:59
|!is_main_script| would be unnecessary.
yuryu
2017/07/20 10:15:12
I intended to reflect the spec, where algorithms f
|
+ blink::WebServiceWorkerUpdateViaCache::kNone); |
+ if (no_update_via_cache || |
+ time_since_last_check > kServiceWorkerScriptMaxCacheAge || |
version_->force_bypass_cache_for_scripts()) { |
extra_load_flags = net::LOAD_BYPASS_CACHE; |
} |