| Index: content/child/service_worker/service_worker_dispatcher.cc
|
| diff --git a/content/child/service_worker/service_worker_dispatcher.cc b/content/child/service_worker/service_worker_dispatcher.cc
|
| index 80166e19e3c1096cbbe11a6700a922b7b9ef7515..dbee44bbb4b2ea4427ded0b70de94fafb8509c39 100644
|
| --- a/content/child/service_worker/service_worker_dispatcher.cc
|
| +++ b/content/child/service_worker/service_worker_dispatcher.cc
|
| @@ -123,6 +123,7 @@ void ServiceWorkerDispatcher::RegisterServiceWorker(
|
| int provider_id,
|
| const GURL& pattern,
|
| const GURL& script_url,
|
| + bool use_cache,
|
| std::unique_ptr<WebServiceWorkerRegistrationCallbacks> callbacks) {
|
| DCHECK(callbacks);
|
|
|
| @@ -137,13 +138,18 @@ void ServiceWorkerDispatcher::RegisterServiceWorker(
|
| }
|
|
|
| int request_id = pending_registration_callbacks_.Add(std::move(callbacks));
|
| + ServiceWorkerRegistrationOptions::UseCache use_cache_enum =
|
| + use_cache ? ServiceWorkerRegistrationOptions::UseCache::Use
|
| + : ServiceWorkerRegistrationOptions::UseCache::DontUse;
|
| + ServiceWorkerRegistrationOptions options(pattern, use_cache_enum);
|
| +
|
| TRACE_EVENT_ASYNC_BEGIN2("ServiceWorker",
|
| "ServiceWorkerDispatcher::RegisterServiceWorker",
|
| request_id,
|
| "Scope", pattern.spec(),
|
| "Script URL", script_url.spec());
|
| thread_safe_sender_->Send(new ServiceWorkerHostMsg_RegisterServiceWorker(
|
| - CurrentWorkerId(), request_id, provider_id, pattern, script_url));
|
| + CurrentWorkerId(), request_id, provider_id, script_url, options));
|
| }
|
|
|
| void ServiceWorkerDispatcher::UpdateServiceWorker(
|
| @@ -186,6 +192,7 @@ void ServiceWorkerDispatcher::GetRegistration(
|
|
|
| int request_id =
|
| pending_get_registration_callbacks_.Add(std::move(callbacks));
|
| +
|
| TRACE_EVENT_ASYNC_BEGIN1("ServiceWorker",
|
| "ServiceWorkerDispatcher::GetRegistration",
|
| request_id,
|
|
|