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

Issue 2319783002: mash: Allow a subset of D-Bus clients to be created in DBusThreadManager (Closed)

Created:
4 years, 3 months ago by James Cook
Modified:
4 years, 2 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, sadrul, asvitkine+watch_chromium.org, hashimoto+watch_chromium.org, mlamouri+watch-content_chromium.org, Peter Beverloo, jam, darin-cc_chromium.org, jochen+watch_chromium.org, oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, kalyank, derat+watch_chromium.org, davemoore+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

chromeos: Allow DBusThreadManager to create a subset of the D-Bus clients On mus the ash process only needs to initialize a subset of the available D-Bus clients. Most clients are only used by chrome, and some of those clients expect to have only a single user of their chrome-facing API. * Use DBusClientTypeMask to specify which clients to create * Keep the existing DBusThreadManager::Initialize() constructor, as it is used extensively in tests * Continue to support the --dbus-unstub-clients command line flag, which requires DBusClientBundle to support a mix of real and fake clients * Rename "stub" to "fake" in locals and methods Existing chrome and ash code continues to use DBusThreadManager::Get()->GetFoo() and will function in both classic ash (with ash running in chrome browser) and mus ash (with ash in its own process). BUG=644414 TEST=added to chromeos_unittests

Patch Set 1 #

Patch Set 2 : cleanup #

Total comments: 5

Patch Set 3 : derat comments #

Patch Set 4 : rebase #

Patch Set 5 : WIP, add DBusThreadManagerAsh and DBusThreadManagerChrome #

Unified diffs Side-by-side diffs Delta from patch set Stats (+581 lines, -220 lines) Patch
M ash/BUILD.gn View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M ash/common/DEPS View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M ash/common/accelerators/accelerator_controller.cc View 1 2 3 4 3 chunks +3 lines, -2 lines 0 comments Download
A ash/common/dbus_thread_manager_ash.h View 1 2 3 4 1 chunk +39 lines, -0 lines 0 comments Download
A ash/common/dbus_thread_manager_ash.cc View 1 2 3 4 1 chunk +47 lines, -0 lines 0 comments Download
M ash/common/system/chromeos/audio/tray_audio_chromeos.cc View 1 2 3 4 2 chunks +4 lines, -5 lines 0 comments Download
M ash/common/system/chromeos/brightness/brightness_controller_chromeos.cc View 1 2 3 4 3 chunks +6 lines, -5 lines 0 comments Download
M ash/common/system/chromeos/brightness/tray_brightness.cc View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download
M ash/common/system/chromeos/keyboard_brightness_controller.cc View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download
M ash/common/system/chromeos/power/power_status.cc View 1 2 3 4 3 chunks +7 lines, -6 lines 0 comments Download
M ash/common/system/chromeos/system_clock_observer.cc View 1 2 3 4 1 chunk +6 lines, -5 lines 0 comments Download
M ash/common/system/date/date_default_view.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M ash/common/wm/maximize_mode/maximize_mode_controller.cc View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download
M ash/mus/window_manager_application.cc View 1 2 3 4 2 chunks +15 lines, -2 lines 0 comments Download
M ash/shell.cc View 1 2 3 4 4 chunks +6 lines, -5 lines 0 comments Download
M ash/system/chromeos/power/power_event_observer.cc View 1 2 3 4 5 chunks +10 lines, -9 lines 0 comments Download
M ash/system/chromeos/power/power_event_observer_unittest.cc View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download
M ash/system/chromeos/power/video_activity_notifier.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M ash/system/chromeos/power/video_activity_notifier_unittest.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M ash/sysui/sysui_application.cc View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download
M ash/test/ash_test_helper.cc View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
M ash/wm/lock_state_controller.cc View 1 2 3 4 3 chunks +3 lines, -2 lines 0 comments Download
M ash/wm/power_button_controller.cc View 1 2 3 4 4 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/BUILD.gn View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/chrome_browser_main_chromeos.cc View 1 2 3 4 5 chunks +18 lines, -2 lines 0 comments Download
A chrome/browser/chromeos/dbus_thread_manager_chrome.h View 1 2 3 4 1 chunk +33 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/dbus_thread_manager_chrome.cc View 1 2 3 4 1 chunk +42 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/system_logs/DEPS View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/system_logs/debug_daemon_log_source.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/system_logs/debug_log_writer.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api_chromeos_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/metrics/chromeos_metrics_provider_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/test/base/testing_io_thread_state.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/base/view_event_test_platform_part_chromeos.cc View 1 chunk +1 line, -1 line 0 comments Download
M chromeos/chromeos.gyp View 1 2 3 3 chunks +1 line, -15 lines 0 comments Download
M chromeos/dbus/cros_disks_client.cc View 1 chunk +1 line, -1 line 0 comments Download
M chromeos/dbus/dbus_client_bundle.h View 4 chunks +26 lines, -12 lines 0 comments Download
M chromeos/dbus/dbus_client_bundle.cc View 1 5 chunks +72 lines, -45 lines 0 comments Download
M chromeos/dbus/dbus_client_bundle_unittest.cc View 1 chunk +32 lines, -1 line 0 comments Download
M chromeos/dbus/dbus_client_implementation_type.h View 1 chunk +1 line, -1 line 0 comments Download
M chromeos/dbus/dbus_thread_manager.h View 1 2 3 chunks +21 lines, -18 lines 0 comments Download
M chromeos/dbus/dbus_thread_manager.cc View 1 2 3 3 chunks +78 lines, -45 lines 0 comments Download
A chromeos/dbus/dbus_thread_manager_unittest.cc View 1 chunk +36 lines, -0 lines 0 comments Download
M chromeos/dbus/power_manager_client.cc View 1 chunk +1 line, -1 line 0 comments Download
M chromeos/dbus/session_manager_client.cc View 1 chunk +1 line, -1 line 0 comments Download
M chromeos/dbus/update_engine_client.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/tracing/tracing_controller_impl.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/shell/browser/shell_browser_main_parts.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M extensions/browser/api/diagnostics/diagnostics_api_chromeos.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M extensions/shell/browser/shell_browser_main_parts.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 29 (16 generated)
James Cook
stevenjb, please take a look. hashimoto, FYI. https://codereview.chromium.org/2319783002/diff/20001/chromeos/dbus/dbus_client_bundle.h File chromeos/dbus/dbus_client_bundle.h (right): https://codereview.chromium.org/2319783002/diff/20001/chromeos/dbus/dbus_client_bundle.h#newcode94 chromeos/dbus/dbus_client_bundle.h:94: static DBusClientTypeMask ...
4 years, 3 months ago (2016-09-07 19:56:07 UTC) #9
Daniel Erat
https://codereview.chromium.org/2319783002/diff/20001/chromeos/dbus/dbus_thread_manager.cc File chromeos/dbus/dbus_thread_manager.cc (right): https://codereview.chromium.org/2319783002/diff/20001/chromeos/dbus/dbus_thread_manager.cc#newcode331 chromeos/dbus/dbus_thread_manager.cc:331: CreateGlobalInstance(fake_clients, real_clients); the parameters here are swapped https://codereview.chromium.org/2319783002/diff/20001/chromeos/dbus/dbus_thread_manager.h File ...
4 years, 3 months ago (2016-09-07 20:31:59 UTC) #11
James Cook
stevenjb / derat, please take another look hashimoto, still FYI https://codereview.chromium.org/2319783002/diff/20001/chromeos/dbus/dbus_thread_manager.cc File chromeos/dbus/dbus_thread_manager.cc (right): https://codereview.chromium.org/2319783002/diff/20001/chromeos/dbus/dbus_thread_manager.cc#newcode331 ...
4 years, 3 months ago (2016-09-07 20:58:12 UTC) #15
Daniel Erat
thanks! lgtm, but i'll let steven take a look too
4 years, 3 months ago (2016-09-07 21:00:10 UTC) #17
hashimoto
Existing code is written with an assumption that DBusThreadManager never returns null for getter methods. ...
4 years, 3 months ago (2016-09-08 06:11:43 UTC) #21
stevenjb
On 2016/09/08 06:11:43, hashimoto wrote: > Existing code is written with an assumption that DBusThreadManager ...
4 years, 3 months ago (2016-09-08 13:50:30 UTC) #22
James Cook
On 2016/09/08 13:50:30, stevenjb wrote: > On 2016/09/08 06:11:43, hashimoto wrote: > > Existing code ...
4 years, 3 months ago (2016-09-08 17:03:28 UTC) #23
Daniel Erat
On 2016/09/08 17:03:28, James Cook wrote: > On 2016/09/08 13:50:30, stevenjb wrote: > > On ...
4 years, 3 months ago (2016-09-09 00:16:05 UTC) #24
hashimoto
On 2016/09/09 00:16:05, Daniel Erat wrote: > On 2016/09/08 17:03:28, James Cook wrote: > > ...
4 years, 3 months ago (2016-09-09 01:50:41 UTC) #25
James Cook
On 2016/09/09 01:50:41, hashimoto wrote: > On 2016/09/09 00:16:05, Daniel Erat wrote: > > On ...
4 years, 3 months ago (2016-09-09 05:30:59 UTC) #26
hashimoto
On 2016/09/09 05:30:59, James Cook wrote: > On 2016/09/09 01:50:41, hashimoto wrote: > > On ...
4 years, 3 months ago (2016-09-09 07:54:11 UTC) #27
James Cook
On 2016/09/09 07:54:11, hashimoto wrote: > On 2016/09/09 05:30:59, James Cook wrote: > > On ...
4 years, 3 months ago (2016-09-09 15:55:26 UTC) #28
James Cook
4 years, 3 months ago (2016-09-09 20:21:54 UTC) #29
I've uploaded a WIP patch, but it's pretty ugly.

Let's move discussion to the bug (http://crbug.com/644414) since I may have to
abandon this patch.

Powered by Google App Engine
This is Rietveld 408576698