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

Issue 2133503002: arc: Revamp the ArcBridgeService interface (Closed)

Created:
4 years, 5 months ago by Luis Héctor Chávez
Modified:
4 years, 5 months ago
CC:
chromium-reviews, elijahtaylor+arcwatch_chromium.org, tapted, cbentzel+watch_chromium.org, ejcaruso+watch_chromium.org, sadrul, yusukes+watch_chromium.org, abhishekbh_chromium.org, posciak+watch_chromium.org, tfarina, hidehiko+watch_chromium.org, dcheng, rginda+watch_chromium.org, lhchavez+watch_chromium.org, Sameer Nanda, oshima+watch_chromium.org, kalyank, Kevin Cernekee, davemoore+watch_chromium.org, Matt Giuca
Base URL:
https://chromium.googlesource.com/a/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

arc: Revamp the ArcBridgeService interface Adding a new host/instance pair required a lot of boilerplate. It also made it very hard to properly do fakes for tests. This change adds two more interfaces: InterfaceHolder<T> and InterfaceObserver<T>, so that ArcBridgeService can stop having hundreds of methods to deal with instance lifecycles. BUG=626695 TEST=trybots Committed: https://crrev.com/de2de961f2851a852febfb7223b0f27df5e6afb9 Cr-Commit-Position: refs/heads/master@{#405025}

Patch Set 1 #

Patch Set 2 : Rebase + tweak interface #

Patch Set 3 : Finish writing comments that were accidentally. #

Patch Set 4 : Adding a change that was accidentally left out #

Patch Set 5 : Fix ui_arc_unittests #

Total comments: 35

Patch Set 6 : Moved InstanceHolder to its own file #

Patch Set 7 : git cl lint #

Patch Set 8 : Fix gn gen --check #

Patch Set 9 : rebase #

Patch Set 10 : more rebase #

Total comments: 6

Patch Set 11 : Dropped parameters in InstanceHolder::Observer methods #

Patch Set 12 : Moved a constexpr closer to where it's used #

Total comments: 2

Patch Set 13 : More rebasing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+777 lines, -1158 lines) Patch
M chrome/browser/chromeos/arc/arc_auth_service.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/chromeos/arc/arc_auth_service.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_downloads_watcher_service.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_downloads_watcher_service.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_navigation_throttle.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_policy_bridge.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_policy_bridge.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_policy_bridge_unittest.cc View 1 3 chunks +13 lines, -13 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_process_service.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_process_service.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_settings_service.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_settings_service.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/arc/gpu_arc_video_service_host.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/arc/gpu_arc_video_service_host.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/file_manager/arc_file_tasks.cc View 1 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/memory/tab_manager_delegate_chromeos.h View 1 2 3 4 5 6 7 8 9 10 6 chunks +13 lines, -13 lines 0 comments Download
M chrome/browser/memory/tab_manager_delegate_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +14 lines, -15 lines 0 comments Download
M chrome/browser/task_management/providers/arc/arc_process_task.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/task_management/providers/arc/arc_process_task.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +14 lines, -14 lines 0 comments Download
M chrome/browser/ui/app_list/arc/arc_app_list_prefs.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc View 1 2 3 4 5 6 7 8 9 10 11 12 20 chunks +60 lines, -70 lines 0 comments Download
M chrome/browser/ui/app_list/arc/arc_app_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +13 lines, -16 lines 0 comments Download
M chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -3 lines 0 comments Download
M components/arc.gypi View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M components/arc/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M components/arc/arc_bridge_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +47 lines, -224 lines 0 comments Download
M components/arc/arc_bridge_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +38 lines, -453 lines 0 comments Download
M components/arc/audio/arc_audio_bridge.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -3 lines 0 comments Download
M components/arc/audio/arc_audio_bridge.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +15 lines, -14 lines 0 comments Download
M components/arc/bluetooth/arc_bluetooth_bridge.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +6 lines, -4 lines 0 comments Download
M components/arc/bluetooth/arc_bluetooth_bridge.cc View 1 2 3 4 5 6 7 8 9 10 25 chunks +34 lines, -36 lines 0 comments Download
M components/arc/clipboard/arc_clipboard_bridge.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -5 lines 0 comments Download
M components/arc/clipboard/arc_clipboard_bridge.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -6 lines 0 comments Download
M components/arc/crash_collector/arc_crash_collector_bridge.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -5 lines 0 comments Download
M components/arc/crash_collector/arc_crash_collector_bridge.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +11 lines, -15 lines 0 comments Download
M components/arc/ime/arc_ime_bridge_impl.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -3 lines 0 comments Download
M components/arc/ime/arc_ime_bridge_impl.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +19 lines, -19 lines 0 comments Download
A components/arc/instance_holder.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +137 lines, -0 lines 0 comments Download
M components/arc/intent_helper/activity_icon_loader.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M components/arc/intent_helper/arc_intent_helper_bridge.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +9 lines, -7 lines 0 comments Download
M components/arc/intent_helper/arc_intent_helper_bridge.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -5 lines 0 comments Download
M components/arc/intent_helper/link_handler_model_impl.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M components/arc/metrics/arc_metrics_service.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +31 lines, -11 lines 0 comments Download
M components/arc/metrics/arc_metrics_service.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +48 lines, -30 lines 0 comments Download
M components/arc/net/arc_net_host_impl.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -3 lines 0 comments Download
M components/arc/net/arc_net_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +13 lines, -13 lines 0 comments Download
M components/arc/obb_mounter/arc_obb_mounter_bridge.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -5 lines 0 comments Download
M components/arc/obb_mounter/arc_obb_mounter_bridge.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -6 lines 0 comments Download
M components/arc/power/arc_power_bridge.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -4 lines 0 comments Download
M components/arc/power/arc_power_bridge.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -6 lines 0 comments Download
M components/arc/storage_manager/arc_storage_manager.h View 4 chunks +6 lines, -10 lines 0 comments Download
M components/arc/storage_manager/arc_storage_manager.cc View 1 3 chunks +3 lines, -7 lines 0 comments Download
M components/arc/test/fake_policy_instance.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -4 lines 0 comments Download
M components/arc/test/fake_policy_instance.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -3 lines 0 comments Download
M components/arc/window_manager/arc_window_manager_bridge.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -5 lines 0 comments Download
M components/arc/window_manager/arc_window_manager_bridge.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +7 lines, -7 lines 0 comments Download
M ui/arc/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M ui/arc/notification/arc_notification_manager.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +10 lines, -8 lines 0 comments Download
M ui/arc/notification/arc_notification_manager.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +16 lines, -11 lines 0 comments Download
M ui/arc/notification/arc_notification_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +14 lines, -8 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 28 (10 generated)
Luis Héctor Chávez
PTAL This manages to remove almost 500 lines of boilerplate in components/arc and is needed ...
4 years, 5 months ago (2016-07-08 16:41:50 UTC) #3
stevenjb
c/b RS LGTM
4 years, 5 months ago (2016-07-08 16:56:21 UTC) #4
afakhry
c/b/task_management lgtm.
4 years, 5 months ago (2016-07-08 17:10:52 UTC) #5
hidehiko
Good refactoring :-). https://codereview.chromium.org/2133503002/diff/80001/chrome/browser/memory/tab_manager_delegate_chromeos.h File chrome/browser/memory/tab_manager_delegate_chromeos.h (right): https://codereview.chromium.org/2133503002/diff/80001/chrome/browser/memory/tab_manager_delegate_chromeos.h#newcode153 chrome/browser/memory/tab_manager_delegate_chromeos.h:153: typedef base::hash_map<base::ProcessHandle, int> ProcessScoreMap; // NOLINT ...
4 years, 5 months ago (2016-07-11 05:24:54 UTC) #6
hidehiko
https://codereview.chromium.org/2133503002/diff/80001/components/arc/arc_bridge_service.h File components/arc/arc_bridge_service.h (right): https://codereview.chromium.org/2133503002/diff/80001/components/arc/arc_bridge_service.h#newcode263 components/arc/arc_bridge_service.h:263: void OnAppInstanceReady(mojom::AppInstancePtr app_ptr) override; On 2016/07/11 05:24:53, hidehiko wrote: ...
4 years, 5 months ago (2016-07-11 06:09:32 UTC) #7
Luis Héctor Chávez
https://codereview.chromium.org/2133503002/diff/80001/chrome/browser/memory/tab_manager_delegate_chromeos.h File chrome/browser/memory/tab_manager_delegate_chromeos.h (right): https://codereview.chromium.org/2133503002/diff/80001/chrome/browser/memory/tab_manager_delegate_chromeos.h#newcode153 chrome/browser/memory/tab_manager_delegate_chromeos.h:153: typedef base::hash_map<base::ProcessHandle, int> ProcessScoreMap; // NOLINT On 2016/07/11 05:24:53, ...
4 years, 5 months ago (2016-07-11 17:13:34 UTC) #8
Luis Héctor Chávez
https://codereview.chromium.org/2133503002/diff/80001/chrome/browser/memory/tab_manager_delegate_chromeos.h File chrome/browser/memory/tab_manager_delegate_chromeos.h (right): https://codereview.chromium.org/2133503002/diff/80001/chrome/browser/memory/tab_manager_delegate_chromeos.h#newcode153 chrome/browser/memory/tab_manager_delegate_chromeos.h:153: typedef base::hash_map<base::ProcessHandle, int> ProcessScoreMap; // NOLINT On 2016/07/11 17:13:33, ...
4 years, 5 months ago (2016-07-11 20:10:44 UTC) #9
hidehiko
LGTM with comments. https://codereview.chromium.org/2133503002/diff/180001/chrome/browser/ui/app_list/arc/arc_app_utils.cc File chrome/browser/ui/app_list/arc/arc_app_utils.cc (right): https://codereview.chromium.org/2133503002/diff/180001/chrome/browser/ui/app_list/arc/arc_app_utils.cc#newcode24 chrome/browser/ui/app_list/arc/arc_app_utils.cc:24: constexpr bool kUseLandscapeLayout = true; optional: ...
4 years, 5 months ago (2016-07-12 16:25:14 UTC) #10
Luis Héctor Chávez
https://codereview.chromium.org/2133503002/diff/180001/chrome/browser/ui/app_list/arc/arc_app_utils.cc File chrome/browser/ui/app_list/arc/arc_app_utils.cc (right): https://codereview.chromium.org/2133503002/diff/180001/chrome/browser/ui/app_list/arc/arc_app_utils.cc#newcode24 chrome/browser/ui/app_list/arc/arc_app_utils.cc:24: constexpr bool kUseLandscapeLayout = true; On 2016/07/12 16:25:14, hidehiko ...
4 years, 5 months ago (2016-07-12 18:00:24 UTC) #11
hidehiko
LGTM, assuming all tests pass. Thank you!
4 years, 5 months ago (2016-07-12 18:13:04 UTC) #12
Georges Khalil
lgtm % 1 question. https://codereview.chromium.org/2133503002/diff/210001/chrome/browser/memory/tab_manager_delegate_chromeos.h File chrome/browser/memory/tab_manager_delegate_chromeos.h (right): https://codereview.chromium.org/2133503002/diff/210001/chrome/browser/memory/tab_manager_delegate_chromeos.h#newcode153 chrome/browser/memory/tab_manager_delegate_chromeos.h:153: typedef base::hash_map<base::ProcessHandle, int> ProcessScoreMap; // ...
4 years, 5 months ago (2016-07-12 18:29:33 UTC) #13
Luis Héctor Chávez
https://codereview.chromium.org/2133503002/diff/210001/chrome/browser/memory/tab_manager_delegate_chromeos.h File chrome/browser/memory/tab_manager_delegate_chromeos.h (right): https://codereview.chromium.org/2133503002/diff/210001/chrome/browser/memory/tab_manager_delegate_chromeos.h#newcode153 chrome/browser/memory/tab_manager_delegate_chromeos.h:153: typedef base::hash_map<base::ProcessHandle, int> ProcessScoreMap; // NOLINT On 2016/07/12 18:29:33, ...
4 years, 5 months ago (2016-07-12 19:51:31 UTC) #14
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/2133503002/210001
4 years, 5 months ago (2016-07-12 21:03:58 UTC) #17
commit-bot: I haz the power
Failed to apply patch for chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc: While running git apply --index -3 -p1; error: patch ...
4 years, 5 months ago (2016-07-13 02:30:07 UTC) #19
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/2133503002/230001
4 years, 5 months ago (2016-07-13 02:45:07 UTC) #23
commit-bot: I haz the power
Committed patchset #13 (id:230001)
4 years, 5 months ago (2016-07-13 04:43:16 UTC) #25
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-13 04:43:33 UTC) #26
commit-bot: I haz the power
4 years, 5 months ago (2016-07-13 04:46:03 UTC) #28
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/de2de961f2851a852febfb7223b0f27df5e6afb9
Cr-Commit-Position: refs/heads/master@{#405025}

Powered by Google App Engine
This is Rietveld 408576698