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

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

Issue 2968123002: Introduce ServiceWorkerRegistrationOptions struct for service worker options (Closed)
Patch Set: Created 3 years, 5 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_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 29c53149b96f0f904a89ba0285ec41c216f229cd..033232bb40c676d6785a8f4dc5e079f0365b1482 100644
--- a/content/browser/service_worker/service_worker_register_job.cc
+++ b/content/browser/service_worker/service_worker_register_job.cc
@@ -68,11 +68,11 @@ typedef ServiceWorkerRegisterJobBase::RegistrationJobType RegistrationJobType;
ServiceWorkerRegisterJob::ServiceWorkerRegisterJob(
base::WeakPtr<ServiceWorkerContextCore> context,
- const GURL& pattern,
- const GURL& script_url)
+ const GURL& script_url,
+ const ServiceWorkerRegistrationOptions& options)
: context_(context),
job_type_(REGISTRATION_JOB),
- pattern_(pattern),
+ pattern_(options.scope),
script_url_(script_url),
phase_(INITIAL),
doom_installing_worker_(false),
@@ -319,8 +319,8 @@ void ServiceWorkerRegisterJob::RegisterAndContinue() {
return;
}
- set_registration(
- new ServiceWorkerRegistration(pattern_, registration_id, context_));
+ set_registration(new ServiceWorkerRegistration(
+ ServiceWorkerRegistrationOptions(pattern_), registration_id, context_));
AddRegistrationToMatchingProviderHosts(registration());
UpdateAndContinue();
}

Powered by Google App Engine
This is Rietveld 408576698