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

Issue 1011643002: ServiceWorker: Introduce SWMessageSender in order to mock IPC messaging (Closed)

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

Description

ServiceWorker: Introduce SWMessageSender in order to mock IPC messaging This CL introduces ServiceWorkerMessageSender that is a thin wrapper of ThreadSafeSender so that unittests can inject a mock sender, and adds some unittests related to reference counting using the mock. BUG=452403 TEST=content_unittests --gtest_filter=ServiceWorkerDispatcherTest.* Committed: https://crrev.com/4d44fa9f7fb3d97b916781a6051ed4dcc69c3668 Cr-Commit-Position: refs/heads/master@{#320885}

Patch Set 1 : #

Total comments: 4

Patch Set 2 : make SWMessageSender thread-safe and replace ThreadSafeSender with SWMessageSender more #

Patch Set 3 : add header comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+401 lines, -117 lines) Patch
M content/child/service_worker/service_worker_dispatcher.h View 1 2 6 chunks +9 lines, -8 lines 0 comments Download
M content/child/service_worker/service_worker_dispatcher.cc View 1 2 13 chunks +19 lines, -27 lines 0 comments Download
A content/child/service_worker/service_worker_dispatcher_unittest.cc View 1 chunk +217 lines, -0 lines 0 comments Download
M content/child/service_worker/service_worker_handle_reference.h View 4 chunks +10 lines, -7 lines 0 comments Download
M content/child/service_worker/service_worker_handle_reference.cc View 2 chunks +5 lines, -6 lines 0 comments Download
M content/child/service_worker/service_worker_message_filter.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M content/child/service_worker/service_worker_message_filter.cc View 1 8 chunks +14 lines, -18 lines 0 comments Download
A content/child/service_worker/service_worker_message_sender.h View 1 2 1 chunk +43 lines, -0 lines 0 comments Download
A content/child/service_worker/service_worker_message_sender.cc View 1 chunk +23 lines, -0 lines 0 comments Download
M content/child/service_worker/service_worker_provider_context.h View 2 chunks +2 lines, -2 lines 0 comments Download
M content/child/service_worker/service_worker_provider_context.cc View 1 5 chunks +14 lines, -16 lines 0 comments Download
M content/child/service_worker/service_worker_registration_handle_reference.h View 3 chunks +5 lines, -5 lines 0 comments Download
M content/child/service_worker/service_worker_registration_handle_reference.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M content/child/service_worker/web_service_worker_impl.h View 3 chunks +3 lines, -3 lines 0 comments Download
M content/child/service_worker/web_service_worker_impl.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M content/child/service_worker/web_service_worker_provider_impl.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M content/child/service_worker/web_service_worker_provider_impl.cc View 1 3 chunks +3 lines, -2 lines 0 comments Download
M content/child/service_worker/web_service_worker_registration_impl.h View 2 chunks +2 lines, -1 line 0 comments Download
M content/common/service_worker/service_worker_types.h View 1 chunk +1 line, -1 line 0 comments Download
M content/content_child.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/service_worker/embedded_worker_context_client.h View 1 3 chunks +3 lines, -2 lines 0 comments Download
M content/renderer/service_worker/embedded_worker_context_client.cc View 1 5 chunks +6 lines, -5 lines 0 comments Download
M content/renderer/service_worker/service_worker_script_context.cc View 1 5 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 17 (6 generated)
nhiroki
Hi ksakamoto@, can you review this? In the curren implementation, ObjectInfo and VersionAttributes implicitly retain ...
5 years, 9 months ago (2015-03-17 01:58:18 UTC) #6
Kunihiko Sakamoto
lgtm with minor comments https://codereview.chromium.org/1011643002/diff/80001/content/child/service_worker/service_worker_message_sender.h File content/child/service_worker/service_worker_message_sender.h (right): https://codereview.chromium.org/1011643002/diff/80001/content/child/service_worker/service_worker_message_sender.h#newcode19 content/child/service_worker/service_worker_message_sender.h:19: class CONTENT_EXPORT ServiceWorkerMessageSender Can you ...
5 years, 9 months ago (2015-03-17 03:40:38 UTC) #7
nhiroki
Thank you for reviewing! The latest patchset changes codebase more widely than the previous one, ...
5 years, 9 months ago (2015-03-17 07:36:54 UTC) #8
Kunihiko Sakamoto
LGTM
5 years, 9 months ago (2015-03-17 08:10:19 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1011643002/120001
5 years, 9 months ago (2015-03-17 08:50:19 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:120001)
5 years, 9 months ago (2015-03-17 09:48:01 UTC) #12
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/4d44fa9f7fb3d97b916781a6051ed4dcc69c3668 Cr-Commit-Position: refs/heads/master@{#320885}
5 years, 9 months ago (2015-03-17 09:48:32 UTC) #13
michaeln
drive by: I don't understand the needs for the new ServiceWorkerMessageSender class? The new class ...
5 years, 9 months ago (2015-03-18 00:18:03 UTC) #14
nhiroki
On 2015/03/18 00:18:03, michaeln wrote: > drive by: I don't understand the needs for the ...
5 years, 9 months ago (2015-03-18 01:51:58 UTC) #15
nhiroki
On 2015/03/18 01:51:58, nhiroki wrote: > On 2015/03/18 00:18:03, michaeln wrote: > > drive by: ...
5 years, 9 months ago (2015-03-18 02:18:44 UTC) #16
nhiroki
5 years, 9 months ago (2015-03-18 02:21:06 UTC) #17
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:120001) has been created in
https://codereview.chromium.org/1002393005/ by nhiroki@chromium.org.

The reason for reverting is: Decided to take a different way to mock IPC
messaging.
See review comments on the original CL for more details..

Powered by Google App Engine
This is Rietveld 408576698