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

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: change useCache to updateViaCache Created 3 years, 6 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..56267f463f30477c80806c6b717bd04151448f3f 100644
--- a/content/browser/service_worker/service_worker_registration.cc
+++ b/content/browser/service_worker/service_worker_registration.cc
@@ -30,10 +30,11 @@ ServiceWorkerVersionInfo GetVersionInfo(ServiceWorkerVersion* version) {
} // namespace
ServiceWorkerRegistration::ServiceWorkerRegistration(
- const GURL& pattern,
+ const ServiceWorkerRegistrationOptions& options,
int64_t registration_id,
base::WeakPtr<ServiceWorkerContextCore> context)
- : pattern_(pattern),
+ : pattern_(options.scope),
+ update_via_cache_(options.update_via_cache),
registration_id_(registration_id),
is_deleted_(false),
is_uninstalling_(false),
@@ -95,7 +96,7 @@ void ServiceWorkerRegistration::NotifyVersionAttributesChanged(
ServiceWorkerRegistrationInfo ServiceWorkerRegistration::GetInfo() {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
return ServiceWorkerRegistrationInfo(
- pattern(), registration_id_,
+ pattern(), update_via_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