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

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

Issue 2771823002: Implement updateViaCache flag and no-cache by default for main service worker scripts
Patch Set: fix tests Created 3 years, 9 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_registration.cc
diff --git a/content/browser/service_worker/service_worker_registration.cc b/content/browser/service_worker/service_worker_registration.cc
index 1a06f2589dd349cb55dd66c3351c7d8863b6f27d..5d968de958659abd6af7e110e066ce0bff04b627 100644
--- a/content/browser/service_worker/service_worker_registration.cc
+++ b/content/browser/service_worker/service_worker_registration.cc
@@ -31,9 +31,11 @@ ServiceWorkerVersionInfo GetVersionInfo(ServiceWorkerVersion* version) {
ServiceWorkerRegistration::ServiceWorkerRegistration(
const GURL& pattern,
+ bool use_cache,
int64_t registration_id,
base::WeakPtr<ServiceWorkerContextCore> context)
: pattern_(pattern),
+ use_cache_(use_cache),
registration_id_(registration_id),
is_deleted_(false),
is_uninstalling_(false),
@@ -95,7 +97,7 @@ void ServiceWorkerRegistration::NotifyVersionAttributesChanged(
ServiceWorkerRegistrationInfo ServiceWorkerRegistration::GetInfo() {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
return ServiceWorkerRegistrationInfo(
- pattern(), registration_id_,
+ pattern(), use_cache(), registration_id_,
is_deleted_ ? ServiceWorkerRegistrationInfo::IS_DELETED
: ServiceWorkerRegistrationInfo::IS_NOT_DELETED,
GetVersionInfo(active_version_.get()),

Powered by Google App Engine
This is Rietveld 408576698