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

Issue 1344783002: ServiceWorker: Carve out methods of ServiceWorkerProviderContext to delegate classes (Closed)

Created:
5 years, 3 months ago by nhiroki
Modified:
5 years, 2 months ago
Reviewers:
falken
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, darin-cc_chromium.org, horo+watch_chromium.org, kinuko+serviceworker, kinuko+watch, blink-worker-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ServiceWorker: Carve out methods of ServiceWorkerProviderContext to delegate classes This is a refactoring CL for ServiceWorkerProviderContext. ServiceWorkerProviderContext is used for a variety of things: For a controlled document, it's used for keeping a controller alive until ServiceWorkerContainer is created. For ServiceWorkerGlobalScope, it's used for keeping an associated registration and its versions alive until the worker context is initialized. This mixed use impairs the readability. This CL carves them out to delegate classes to improve readability. In addition, this removes a lock to protect service worker versions accessed from both the main thread and the worker thread (this access pattern can happen only when a provider context is created for ServiceWorkerGlobalScope). Actually the lock was not necessary because ownership of the versions are transferred from the main thread to the worker thread after registration association is done. BUG=532098 Committed: https://crrev.com/cd2a5a60f93a81f8cec4171f048de2e54250b0f2 Cr-Commit-Position: refs/heads/master@{#352807}

Patch Set 1 : #

Patch Set 2 : rebase #

Patch Set 3 : add class comment #

Total comments: 8

Patch Set 4 : rebase #

Patch Set 5 : add class comments more #

Unified diffs Side-by-side diffs Delta from patch set Stats (+193 lines, -95 lines) Patch
M content/child/service_worker/service_worker_dispatcher.cc View 1 2 3 2 chunks +0 lines, -6 lines 0 comments Download
M content/child/service_worker/service_worker_network_provider.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/child/service_worker/service_worker_provider_context.h View 1 2 3 4 4 chunks +26 lines, -19 lines 0 comments Download
M content/child/service_worker/service_worker_provider_context.cc View 1 2 3 2 chunks +157 lines, -55 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M content/renderer/service_worker/service_worker_context_client.cc View 1 2 3 3 chunks +6 lines, -13 lines 0 comments Download

Messages

Total messages: 23 (13 generated)
nhiroki
PTAL when you have time (just a refactoring CL)
5 years, 3 months ago (2015-09-17 08:22:01 UTC) #12
nhiroki
-kinuko@ and +falken@ because she might be busy now. falken@, can you review this?
5 years, 2 months ago (2015-09-28 01:44:34 UTC) #14
kinuko (google)
Sorry hiroki for slow review. One minor nit I noticed: probably 'curve out' -> 'carve ...
5 years, 2 months ago (2015-09-28 02:24:14 UTC) #15
nhiroki
Thank you for reviewing! On 2015/09/28 02:24:14, kinuko (google) wrote: > Sorry hiroki for slow ...
5 years, 2 months ago (2015-09-29 02:08:49 UTC) #16
falken
Looks like a nice refactoring. https://codereview.chromium.org/1344783002/diff/240001/content/child/service_worker/service_worker_provider_context.h File content/child/service_worker/service_worker_provider_context.h (right): https://codereview.chromium.org/1344783002/diff/240001/content/child/service_worker/service_worker_provider_context.h#newcode31 content/child/service_worker/service_worker_provider_context.h:31: // - For controllees, ...
5 years, 2 months ago (2015-10-07 06:39:13 UTC) #17
nhiroki
Thank you for reviewing! Updated. https://codereview.chromium.org/1344783002/diff/240001/content/child/service_worker/service_worker_provider_context.h File content/child/service_worker/service_worker_provider_context.h (right): https://codereview.chromium.org/1344783002/diff/240001/content/child/service_worker/service_worker_provider_context.h#newcode31 content/child/service_worker/service_worker_provider_context.h:31: // - For controllees, ...
5 years, 2 months ago (2015-10-07 07:50:38 UTC) #18
falken
lgtm
5 years, 2 months ago (2015-10-07 07:55:48 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1344783002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1344783002/280001
5 years, 2 months ago (2015-10-07 08:37:55 UTC) #21
commit-bot: I haz the power
Committed patchset #5 (id:280001)
5 years, 2 months ago (2015-10-07 09:25:39 UTC) #22
commit-bot: I haz the power
5 years, 2 months ago (2015-10-07 09:26:30 UTC) #23
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/cd2a5a60f93a81f8cec4171f048de2e54250b0f2
Cr-Commit-Position: refs/heads/master@{#352807}

Powered by Google App Engine
This is Rietveld 408576698