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

Issue 2804373002: Eliminate Connector::Connect(), Connection, etc. (Closed)

Created:
3 years, 8 months ago by Ben Goodger (Google)
Modified:
3 years, 8 months ago
CC:
Aaron Boodman, abarth-chromium, alokp+watch_chromium.org, chromium-reviews, darin (slow to review), feature-media-reviews_chromium.org, kalyank, qsr+mojo_chromium.org, rjkroege, sadrul, tfarina, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Eliminate Connector::Connect(), Connection, etc. . Introduce a new Connector method StartService(Identity id); which allows a service to be started by the service manager but no connection to be made to it. . Migrates service manager tests away from Connection, OnConnect etc. . Eliminate Connector::Connect(), Service::OnConnect() & logic in ServiceManager supporting them. . Eliminate the Connection object & remove #includes . Change how Connector response callbacks are run to guarantee they're reliably called. (Called upon destruction of ConnectParams). R=rockot@chromium.org,tsepez@chromium.org Review-Url: https://codereview.chromium.org/2804373002 Cr-Commit-Position: refs/heads/master@{#464167} Committed: https://chromium.googlesource.com/chromium/src/+/aad37ecd104724b8fae303f241c9ce8af45a1fc1

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : . #

Patch Set 7 : . #

Patch Set 8 : . #

Patch Set 9 : . #

Patch Set 10 : . #

Patch Set 11 : . #

Patch Set 12 : . #

Patch Set 13 : . #

Total comments: 2

Patch Set 14 : . #

Patch Set 15 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+588 lines, -1018 lines) Patch
M ash/mus/app_launch_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ash/mus/window_manager_application.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M ash/mus/window_manager_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/app/mash/mash_runner.cc View 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/test/base/mash_browser_tests_main.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/filesystem/file_system_app.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M components/font_service/font_service_app.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/browser_context.cc View 1 2 3 4 5 6 7 8 4 chunks +3 lines, -7 lines 0 comments Download
M content/browser/gpu/gpu_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/utility_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -1 line 0 comments Download
M content/child/child_thread_impl.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -7 lines 0 comments Download
M content/public/test/test_service.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M mash/catalog_viewer/catalog_viewer.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M mash/example/views_examples/views_examples.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M mash/example/window_type_launcher/window_type_launcher.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M mash/session/session.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M mash/task_viewer/task_viewer.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M media/mojo/services/media_service.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M media/mojo/services/media_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +7 lines, -4 lines 0 comments Download
M services/catalog/catalog.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M services/device/device_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -1 line 0 comments Download
M services/device/device_service_test_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +10 lines, -6 lines 0 comments Download
M services/device/public/cpp/power_monitor/power_monitor_broadcast_source.h View 1 2 3 4 5 2 chunks +5 lines, -3 lines 0 comments Download
M services/device/public/cpp/power_monitor/power_monitor_broadcast_source.cc View 1 2 3 4 5 1 chunk +6 lines, -3 lines 0 comments Download
M services/file/file_service.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M services/file/file_system.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M services/identity/identity_service.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M services/navigation/navigation_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +1 line, -2 lines 0 comments Download
M services/service_manager/background/tests/background_service_manager_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -6 lines 0 comments Download
M services/service_manager/background/tests/test_service.cc View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -6 lines 0 comments Download
M services/service_manager/connect_params.h View 1 2 3 4 5 6 7 8 4 chunks +14 lines, -23 lines 0 comments Download
M services/service_manager/connect_params.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -1 line 0 comments Download
M services/service_manager/connect_util.cc View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download
M services/service_manager/public/cpp/BUILD.gn View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -3 lines 0 comments Download
D services/service_manager/public/cpp/connection.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -96 lines 0 comments Download
M services/service_manager/public/cpp/connector.h View 1 2 3 4 5 6 7 8 6 chunks +32 lines, -20 lines 0 comments Download
M services/service_manager/public/cpp/lib/connection_impl.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -76 lines 0 comments Download
M services/service_manager/public/cpp/lib/connection_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -100 lines 0 comments Download
M services/service_manager/public/cpp/lib/connector_impl.h View 1 2 3 4 3 chunks +10 lines, -3 lines 0 comments Download
M services/service_manager/public/cpp/lib/connector_impl.cc View 1 2 3 4 5 6 7 8 6 chunks +33 lines, -33 lines 0 comments Download
M services/service_manager/public/cpp/lib/identity.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M services/service_manager/public/cpp/lib/interface_registry.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M services/service_manager/public/cpp/lib/service.cc View 1 2 3 4 5 6 7 8 3 chunks +1 line, -29 lines 0 comments Download
M services/service_manager/public/cpp/lib/service_context.cc View 1 2 3 4 5 6 7 8 4 chunks +0 lines, -60 lines 0 comments Download
M services/service_manager/public/cpp/lib/service_test.cc View 1 2 3 1 chunk +4 lines, -5 lines 0 comments Download
M services/service_manager/public/cpp/service.h View 1 2 3 4 5 6 7 8 3 chunks +0 lines, -13 lines 0 comments Download
M services/service_manager/public/cpp/service_context.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -17 lines 0 comments Download
M services/service_manager/public/cpp/service_test.h View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M services/service_manager/public/interfaces/connector.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +97 lines, -73 lines 0 comments Download
M services/service_manager/public/interfaces/service.mojom View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -21 lines 0 comments Download
M services/service_manager/service_manager.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -2 lines 0 comments Download
M services/service_manager/service_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 10 chunks +81 lines, -143 lines 0 comments Download
M services/service_manager/standalone/context.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -4 lines 0 comments Download
M services/service_manager/tests/connect/connect_test_app.cc View 1 2 3 8 chunks +40 lines, -35 lines 0 comments Download
M services/service_manager/tests/connect/connect_test_class_app.cc View 1 2 3 3 chunks +25 lines, -19 lines 0 comments Download
M services/service_manager/tests/connect/connect_test_package.cc View 1 2 3 7 chunks +46 lines, -29 lines 0 comments Download
M services/service_manager/tests/connect/connect_test_singleton_app.cc View 1 2 3 1 chunk +0 lines, -6 lines 0 comments Download
M services/service_manager/tests/connect/connect_unittest.cc View 1 2 3 17 chunks +64 lines, -64 lines 0 comments Download
M services/service_manager/tests/lifecycle/app_client.h View 1 2 3 3 chunks +5 lines, -2 lines 0 comments Download
M services/service_manager/tests/lifecycle/app_client.cc View 1 2 3 1 chunk +8 lines, -6 lines 0 comments Download
M services/service_manager/tests/service_manager/service_manager_unittest.cc View 1 2 3 8 chunks +16 lines, -18 lines 0 comments Download
M services/service_manager/tests/service_manager/target.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M services/service_manager/tests/shutdown/shutdown_client_app.cc View 1 2 3 3 chunks +10 lines, -6 lines 0 comments Download
M services/service_manager/tests/shutdown/shutdown_service_app.cc View 1 2 3 3 chunks +11 lines, -6 lines 0 comments Download
M services/service_manager/tests/util.h View 1 1 chunk +4 lines, -3 lines 0 comments Download
M services/service_manager/tests/util.cc View 1 4 chunks +11 lines, -7 lines 0 comments Download
M services/tracing/public/cpp/provider.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M services/ui/demo/mus_demo_unittests.cc View 1 chunk +1 line, -1 line 0 comments Download
M services/ui/display/output_protection.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M services/ui/display/screen_manager_ozone_internal.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M services/ui/ime/ime_server_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M services/ui/ime/ime_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M services/ui/input_devices/input_device_server.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M services/ui/service.cc View 1 2 3 4 5 2 chunks +0 lines, -2 lines 0 comments Download
M services/ui/ws/gpu_host.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M services/ui/ws/window_server.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M services/ui/ws/window_server_service_test_base.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M services/ui/ws/window_tree_client_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M ui/ozone/platform/drm/gpu/drm_thread.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M ui/ozone/platform/drm/gpu/drm_thread.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/mus/mus_client.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/mus/screen_mus.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/mus/views_mus_test_suite.cc View 1 chunk +1 line, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 56 (46 generated)
Ben Goodger (Google)
OK. Sorry this looks large, most of the effort is in //services/service_manager. Tom: *.mojom. This ...
3 years, 8 months ago (2017-04-11 21:18:12 UTC) #35
Ken Rockot(use gerrit already)
LGTM. BTW I'm not entirely sure that StartService is something we want to encourage in ...
3 years, 8 months ago (2017-04-11 23:29:44 UTC) #38
Ben Goodger (Google)
On 2017/04/11 23:29:44, Ken Rockot wrote: > LGTM. > > BTW I'm not entirely sure ...
3 years, 8 months ago (2017-04-11 23:33:23 UTC) #41
Tom Sepez
lgtm https://codereview.chromium.org/2804373002/diff/240001/services/service_manager/public/interfaces/connector.mojom File services/service_manager/public/interfaces/connector.mojom (right): https://codereview.chromium.org/2804373002/diff/240001/services/service_manager/public/interfaces/connector.mojom#newcode105 services/service_manager/public/interfaces/connector.mojom:105: // user id to BindInterface(), which will be ...
3 years, 8 months ago (2017-04-12 16:18:48 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2804373002/260001
3 years, 8 months ago (2017-04-12 19:18:32 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/360951)
3 years, 8 months ago (2017-04-12 19:34:41 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2804373002/280001
3 years, 8 months ago (2017-04-12 19:50:10 UTC) #50
commit-bot: I haz the power
Committed patchset #15 (id:280001) as https://chromium.googlesource.com/chromium/src/+/aad37ecd104724b8fae303f241c9ce8af45a1fc1
3 years, 8 months ago (2017-04-12 22:09:24 UTC) #53
seantopping
Hey Ben, Chromecast has a use case for spinning up and watching services that don't ...
3 years, 8 months ago (2017-04-18 22:48:50 UTC) #55
Ben Goodger (Google)
3 years, 8 months ago (2017-04-19 01:46:18 UTC) #56
Message was sent while issue was closed.
You invent another interface specific to that purpose.

See for example content::mojom::Child.

-Ben

On Tue, Apr 18, 2017, 3:48 PM <seantopping@chromium.org> wrote:

> Hey Ben,
>
> Chromecast has a use case for spinning up and watching services that don't
> expose any interfaces; We were previously using a
> service_manager::Connection to
> start an out-of-process "service" and set a connection error handler to
> restart
> the service in case it dies unexpectedly.
>
> Under this new API, what's the preferred method for maintaining this logic?
>
> https://codereview.chromium.org/2804373002/
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698