| 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..1aadbff0c2d09f93785331c446548122eedbcc08 100644
|
| --- a/content/browser/service_worker/service_worker_register_job.cc
|
| +++ b/content/browser/service_worker/service_worker_register_job.cc
|
| @@ -68,12 +68,13 @@ 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),
|
| + update_via_cache_(options.update_via_cache),
|
| phase_(INITIAL),
|
| doom_installing_worker_(false),
|
| is_promise_resolved_(false),
|
| @@ -91,6 +92,7 @@ ServiceWorkerRegisterJob::ServiceWorkerRegisterJob(
|
| : context_(context),
|
| job_type_(UPDATE_JOB),
|
| pattern_(registration->pattern()),
|
| + update_via_cache_(registration->update_via_cache()),
|
| phase_(INITIAL),
|
| doom_installing_worker_(false),
|
| is_promise_resolved_(false),
|
| @@ -319,8 +321,9 @@ void ServiceWorkerRegisterJob::RegisterAndContinue() {
|
| return;
|
| }
|
|
|
| - set_registration(
|
| - new ServiceWorkerRegistration(pattern_, registration_id, context_));
|
| + set_registration(new ServiceWorkerRegistration(
|
| + ServiceWorkerRegistrationOptions(pattern_, update_via_cache_),
|
| + registration_id, context_));
|
| AddRegistrationToMatchingProviderHosts(registration());
|
| UpdateAndContinue();
|
| }
|
|
|