service worker: Simplify setting registration on service workers

Desktop / Chromium - Matt Falkenhagen [chromium.org] - 8 August 2017 03:16 EDT

Just a refactoring:- Don't go through ServiceWorkerDispatcher- Remove the HasAssociatedRegistration() sanity check which doesn't make sense anymore after we removed SetHostedVersionID (previously this would indicate we did not load via ServiceWorkerContextRequestHandler but now after by ServiceWorkerNetworkProvider when starting the worker)

https: //crrev.com/820c6c249b597a415 registration is set directly Change-Id: I62992dd16e7fb8144f217164d2e036ab343b5891 Reviewed-on: https://chromium-review.googlesource.com/603188

8f51b9d service worker: Simplify setting registration on service workers
.../service_worker/service_worker_dispatcher.cc | 20 ----
.../service_worker/service_worker_dispatcher.h | 7 --
.../service_worker_dispatcher_unittest.cc | 84 ++------------
.../service_worker_network_provider.cc | 42 ++++---
.../service_worker_provider_context.cc | 52 +++------
.../service_worker_provider_context.h | 26 +++--
.../service_worker_provider_context_unittest.cc | 125 +++++++++++++++++++++
.../service_worker_registration_handle_reference.h | 2 +-
.../service_worker_context_client.cc | 7 +-
.../service_worker/service_worker_context_client.h | 1 -
content/test/BUILD.gn | 1 +
.../modules/exported/WebEmbeddedWorkerImpl.cpp | 8 +-
.../serviceworkers/WebEmbeddedWorkerImplTest.cpp | 40 -------
.../serviceworker/WebServiceWorkerContextClient.h | 6 -
14 files changed, 197 insertions(+), 224 deletions(-)

Upstream: git.chromium.org


  • Share