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..ee8887a1b4dfdb3fe89ecb1c18830e02632ca7e2 100644 |
--- a/content/browser/service_worker/service_worker_register_job.cc |
+++ b/content/browser/service_worker/service_worker_register_job.cc |
@@ -345,10 +345,7 @@ 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) || |
+ if (new_version()->embedded_worker()->network_accessed_for_script() || |
nhiroki
2015/08/24 07:57:51
This could break some content_unittests?
jungkees
2015/08/25 09:36:51
Ah yes.. I found ServiceWorkerJobTest.Update_BumpL
nhiroki
2015/08/28 09:19:55
Thank you for clarifying the spec. The latest spec
jungkees
2015/09/04 12:56:57
As per the latest spec change, I moved this part t
|
new_version()->force_bypass_cache_for_scripts()) { |
nhiroki
2015/08/24 07:57:51
This second condition seems no longer necessary be
jungkees
2015/08/25 09:36:51
Yes. I'll remove this second condition.
|
registration()->set_last_update_check(base::Time::Now()); |
context_->storage()->UpdateLastUpdateCheckTime(registration()); |