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

Issue 592153002: Replace Chrome IPC with Mojo IPC for querying BatteryStatus service (Closed)

Created:
6 years, 3 months ago by ppi
Modified:
6 years, 1 month ago
CC:
chromium-reviews, creis+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, nasko+codewatch_chromium.org, timvolodine, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, yzshen+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, darin (slow to review), ben+mojo_chromium.org, qsr
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Replace Chrome IPC with Mojo IPC for querying BatteryStatus service This is based on patch set 26 from Darin's https://codereview.chromium.org/457933002/ . BUG=420623 Committed: https://crrev.com/9e6d2387b6d9b28ab6defe7f5feb715a5abbc242 Cr-Commit-Position: refs/heads/master@{#301380}

Patch Set 1 : Patch set 26 from https://codereview.chromium.org/457933002/ #

Patch Set 2 : GN and Mac fixes. #

Patch Set 3 : Rebase. #

Patch Set 4 : Re-add "Always activate MojoApplicationHost" as it was reverted in trunk. #

Patch Set 5 : GN Android fixes. #

Total comments: 14

Patch Set 6 : Rebase. #

Patch Set 7 : Drop build dependency on Guava, which is now gone. #

Patch Set 8 : Rebase. #

Patch Set 9 : Fix the Android GN build again. #

Patch Set 10 : Address Tim's comments. #

Total comments: 10

Patch Set 11 : Rebase. #

Patch Set 12 : Rebase. #

Patch Set 13 : Update the GN build after the mojo/system -> mojo/edk/system move. #

Patch Set 14 : Address Tim's comments. #

Patch Set 15 : Add "Always activate MojoApplicationHost" again as its reland and re-revert ate it in rebases. #

Patch Set 16 : Rebase. #

Patch Set 17 : Update device_tests.gyp after https://codereview.chromium.org/632853002. #

Patch Set 18 : Rebase. #

Patch Set 19 : Rebase. #

Patch Set 20 : Rebase. #

Total comments: 4

Patch Set 21 : Rebase. #

Patch Set 22 : Address Trung's comment (BatteryMonitorClient -> BatteryStatusObserver) #

Patch Set 23 : Address Tom's comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+832 lines, -2854 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download
M content/app/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M content/app/android/library_loader_hooks.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +7 lines, -14 lines 0 comments Download
M content/browser/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +1 line, -1 line 0 comments Download
M content/browser/android/browser_jni_registrar.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +0 lines, -2 lines 0 comments Download
D content/browser/battery_status/OWNERS View 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/battery_status/battery_status_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 9 chunks +31 lines, -29 lines 0 comments Download
D content/browser/battery_status/battery_status_manager.h View 1 chunk +0 lines, -36 lines 0 comments Download
D content/browser/battery_status/battery_status_manager_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -45 lines 0 comments Download
D content/browser/battery_status/battery_status_manager_android.cc View 1 chunk +0 lines, -65 lines 0 comments Download
D content/browser/battery_status/battery_status_manager_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -184 lines 0 comments Download
D content/browser/battery_status/battery_status_manager_default.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -40 lines 0 comments Download
D content/browser/battery_status/battery_status_manager_linux.h View 1 chunk +0 lines, -34 lines 0 comments Download
D content/browser/battery_status/battery_status_manager_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -383 lines 0 comments Download
D content/browser/battery_status/battery_status_manager_linux_unittest.cc View 1 chunk +0 lines, -143 lines 0 comments Download
D content/browser/battery_status/battery_status_manager_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -286 lines 0 comments Download
D content/browser/battery_status/battery_status_manager_win.h View 1 chunk +0 lines, -26 lines 0 comments Download
D content/browser/battery_status/battery_status_manager_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -239 lines 0 comments Download
D content/browser/battery_status/battery_status_manager_win_unittest.cc View 1 chunk +0 lines, -80 lines 0 comments Download
D content/browser/battery_status/battery_status_message_filter.cc View 1 chunk +0 lines, -56 lines 0 comments Download
D content/browser/battery_status/battery_status_service.h View 1 chunk +0 lines, -66 lines 0 comments Download
D content/browser/battery_status/battery_status_service.cc View 1 chunk +0 lines, -106 lines 0 comments Download
D content/browser/battery_status/battery_status_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -189 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +3 lines, -0 lines 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 15 16 17 18 19 20 5 chunks +7 lines, -3 lines 0 comments Download
D content/common/battery_status_messages.h View 1 chunk +0 lines, -32 lines 0 comments Download
M content/common/content_message_generator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -1 line 0 comments Download
M content/content.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 7 chunks +2 lines, -21 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -1 line 0 comments Download
M content/content_jni.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -1 line 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 6 chunks +3 lines, -6 lines 0 comments Download
D content/public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -148 lines 0 comments Download
D content/public/android/javatests/src/org/chromium/content/browser/BatteryStatusManagerTest.java View 1 chunk +0 lines, -166 lines 0 comments Download
M content/renderer/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/battery_status/battery_status_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +12 lines, -15 lines 0 comments Download
M content/renderer/battery_status/battery_status_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +19 lines, -32 lines 0 comments Download
M content/renderer/renderer_blink_platform_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +30 lines, -24 lines 0 comments Download
M content/renderer/shared_memory_seqlock_reader.h View 2 chunks +1 line, -2 lines 0 comments Download
M content/renderer/shared_memory_seqlock_reader.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M content/test/data/battery_status/battery_status_default_test.html View 1 chunk +1 line, -1 line 0 comments Download
M content/test/data/battery_status/battery_status_promise_resolution_test.html View 1 chunk +1 line, -1 line 0 comments Download
A device/battery/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +103 lines, -0 lines 0 comments Download
A + device/battery/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
A device/battery/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +4 lines, -0 lines 0 comments Download
A + device/battery/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +5 lines, -4 lines 0 comments Download
A device/battery/android/battery_jni_registrar.h View 1 chunk +20 lines, -0 lines 0 comments Download
A device/battery/android/battery_jni_registrar.cc View 1 chunk +27 lines, -0 lines 0 comments Download
A + device/battery/android/java/src/org/chromium/device/battery/BatteryStatusManager.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +5 lines, -5 lines 0 comments Download
A + device/battery/android/javatests/src/org/chromium/device/battery/BatteryStatusManagerTest.java View 1 chunk +1 line, -1 line 0 comments Download
A device/battery/battery.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +141 lines, -0 lines 0 comments Download
A device/battery/battery_export.h View 1 chunk +29 lines, -0 lines 0 comments Download
A device/battery/battery_monitor.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +18 lines, -0 lines 0 comments Download
A device/battery/battery_monitor_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +34 lines, -0 lines 0 comments Download
A device/battery/battery_monitor_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +34 lines, -0 lines 0 comments Download
A + device/battery/battery_status.mojom View 1 chunk +6 lines, -8 lines 0 comments Download
A + device/battery/battery_status_manager.h View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -8 lines 0 comments Download
A + device/battery/battery_status_manager_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +6 lines, -6 lines 0 comments Download
A + device/battery/battery_status_manager_android.cc View 4 chunks +6 lines, -6 lines 0 comments Download
A + device/battery/battery_status_manager_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 6 chunks +22 lines, -50 lines 0 comments Download
A + device/battery/battery_status_manager_default.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +3 lines, -3 lines 0 comments Download
A + device/battery/battery_status_manager_linux.h View 2 chunks +9 lines, -9 lines 0 comments Download
A + device/battery/battery_status_manager_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 12 chunks +14 lines, -24 lines 0 comments Download
A + device/battery/battery_status_manager_linux_unittest.cc View 9 chunks +31 lines, -31 lines 0 comments Download
A + device/battery/battery_status_manager_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 14 chunks +27 lines, -70 lines 0 comments Download
A + device/battery/battery_status_manager_win.h View 2 chunks +8 lines, -8 lines 0 comments Download
A + device/battery/battery_status_manager_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 8 chunks +20 lines, -47 lines 0 comments Download
A + device/battery/battery_status_manager_win_unittest.cc View 6 chunks +18 lines, -18 lines 0 comments Download
A + device/battery/battery_status_service.h View 1 2 3 4 5 6 7 8 9 3 chunks +23 lines, -18 lines 0 comments Download
A + device/battery/battery_status_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +30 lines, -30 lines 0 comments Download
A + device/battery/battery_status_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 11 chunks +31 lines, -26 lines 0 comments Download
M device/device_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +15 lines, -1 line 0 comments Download
M mojo/common/handle_watcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 40 (15 generated)
ppi
Hello, This is taken over from Darin's https://codereview.chromium.org/457933002/ . Adding - timvolodine@ for battery status ...
6 years, 3 months ago (2014-09-23 18:04:03 UTC) #5
ppi
ping - Tim, Ken, John, could you take a look?
6 years, 2 months ago (2014-09-25 18:38:36 UTC) #6
timvolodine
thanks ppi@, some initial comments on the battery API code. https://codereview.chromium.org/592153002/diff/120001/device/battery/battery_status_manager.h File device/battery/battery_status_manager.h (right): https://codereview.chromium.org/592153002/diff/120001/device/battery/battery_status_manager.h#newcode9 ...
6 years, 2 months ago (2014-09-25 23:08:33 UTC) #7
jam
On 2014/09/25 18:38:36, ppi wrote: > ping - Tim, Ken, John, could you take a ...
6 years, 2 months ago (2014-09-27 00:55:59 UTC) #9
ppi
Thanks Tim, ptal. John, Darin is the original author of the CL, so I think ...
6 years, 2 months ago (2014-09-29 16:43:27 UTC) #13
Ken Rockot(use gerrit already)
device/ lgtm
6 years, 2 months ago (2014-09-29 16:52:26 UTC) #14
timvolodine
ok looks good, just a few more comments. https://codereview.chromium.org/592153002/diff/250001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/592153002/diff/250001/content/browser/renderer_host/render_process_host_impl.cc#newcode2094 content/browser/renderer_host/render_process_host_impl.cc:2094: mojo_application_host_->Activate(this, ...
6 years, 2 months ago (2014-09-30 16:26:02 UTC) #15
ppi
Thanks Tim, ptal. https://codereview.chromium.org/592153002/diff/250001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/592153002/diff/250001/content/browser/renderer_host/render_process_host_impl.cc#newcode2094 content/browser/renderer_host/render_process_host_impl.cc:2094: mojo_application_host_->Activate(this, GetHandle()); On 2014/09/30 16:26:01, timvolodine ...
6 years, 2 months ago (2014-10-06 13:50:02 UTC) #17
timvolodine
thanks ppi@! lgtm battery status api code :)
6 years, 2 months ago (2014-10-21 11:39:41 UTC) #19
ppi
Thanks, Tim! This should be ready for Jam's review now - Jam, could you take ...
6 years, 2 months ago (2014-10-21 12:14:54 UTC) #20
ppi
After chatting with jam@, adding Trung for the mojom files. Trung, do you think there's ...
6 years, 2 months ago (2014-10-22 22:02:28 UTC) #23
viettrungluu
https://codereview.chromium.org/592153002/diff/510001/device/battery/battery_monitor.mojom File device/battery/battery_monitor.mojom (right): https://codereview.chromium.org/592153002/diff/510001/device/battery/battery_monitor.mojom#newcode11 device/battery/battery_monitor.mojom:11: interface BatteryMonitor { I guess this interface would work, ...
6 years, 2 months ago (2014-10-22 22:05:32 UTC) #24
ppi
Thanks, Trung, please tal at the reply inline. Wdyt? https://codereview.chromium.org/592153002/diff/510001/device/battery/battery_monitor.mojom File device/battery/battery_monitor.mojom (right): https://codereview.chromium.org/592153002/diff/510001/device/battery/battery_monitor.mojom#newcode11 device/battery/battery_monitor.mojom:11: ...
6 years, 2 months ago (2014-10-23 15:42:40 UTC) #25
jam
content lgtm
6 years, 2 months ago (2014-10-23 16:19:17 UTC) #26
ppi
+jln@ for the removal of battery_status_messages.h - ptal
6 years, 2 months ago (2014-10-23 16:34:58 UTC) #28
viettrungluu
On 2014/10/23 15:42:40, ppi wrote: > Thanks, Trung, please tal at the reply inline. Wdyt? ...
6 years, 2 months ago (2014-10-24 01:21:34 UTC) #29
jln (very slow on Chromium)
I'm adding tsepez@ who followed the work on Mojo IPCs. This is the first CL ...
6 years, 2 months ago (2014-10-24 01:25:02 UTC) #31
blundell
On 2014/10/24 01:25:02, jln wrote: > I'm adding tsepez@ who followed the work on Mojo ...
6 years, 2 months ago (2014-10-24 06:33:21 UTC) #32
blundell
On 2014/10/24 06:33:21, blundell wrote: > On 2014/10/24 01:25:02, jln wrote: > > I'm adding ...
6 years, 2 months ago (2014-10-24 06:34:34 UTC) #33
Tom Sepez
LGTM once comment is addressed. https://codereview.chromium.org/592153002/diff/510001/device/battery/OWNERS File device/battery/OWNERS (right): https://codereview.chromium.org/592153002/diff/510001/device/battery/OWNERS#newcode1 device/battery/OWNERS:1: timvolodine@chromium.org add: per-file *.mojom=set ...
6 years, 2 months ago (2014-10-24 16:43:47 UTC) #34
ppi
Thanks, Tom! Trung, I renamed BatteryMonitorClient to BatteryStatusObserver as suggested, thanks! https://codereview.chromium.org/592153002/diff/510001/device/battery/OWNERS File device/battery/OWNERS (right): ...
6 years, 1 month ago (2014-10-27 15:40:59 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/592153002/570001
6 years, 1 month ago (2014-10-27 15:43:30 UTC) #37
commit-bot: I haz the power
Committed patchset #23 (id:570001)
6 years, 1 month ago (2014-10-27 16:48:39 UTC) #38
commit-bot: I haz the power
Patchset 23 (id:??) landed as https://crrev.com/9e6d2387b6d9b28ab6defe7f5feb715a5abbc242 Cr-Commit-Position: refs/heads/master@{#301380}
6 years, 1 month ago (2014-10-27 16:49:47 UTC) #39
leviw_travelin_and_unemployed
6 years, 1 month ago (2014-10-27 18:50:40 UTC) #40
Message was sent while issue was closed.
A revert of this CL (patchset #23 id:570001) has been created in
https://codereview.chromium.org/676953005/ by leviw@chromium.org.

The reason for reverting is: Broke battery-status LayoutTests:
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=bat....

Powered by Google App Engine
This is Rietveld 408576698