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

Issue 13638018: Add PeripheralBatteryObserver (Closed)

Created:
7 years, 8 months ago by Yufeng Shen (Slow to review)
Modified:
7 years, 8 months ago
CC:
chromium-reviews, derat+watch_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, oshima+watch_chromium.org, nkostylev+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Add PeripheralBatteryObserver PeripheralBatteryObserver is an observer of PowerManagerClient. It monitors battery level of peripheral devices and shows notification when the device battery is in low level conditions. BUG=221420 TEST=Manual tested on Link with Apple Magic Mouse/Trackpad. TBR=sky Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193802

Patch Set 1 #

Total comments: 2

Patch Set 2 : update #

Patch Set 3 : Listen on bluetooth device removal to cancel notification #

Patch Set 4 : removed unused const #

Total comments: 40

Patch Set 5 : removed image icons; use device bluetooth address as key; addressed comments #

Patch Set 6 : update #

Total comments: 36

Patch Set 7 : browser tests added #

Total comments: 24

Patch Set 8 : update #

Total comments: 2

Patch Set 9 : remove expection from mock_dbus_thread_manager #

Patch Set 10 : fix header file order #

Patch Set 11 : Make PeripheralBatteryNotificationDelegate's dtor private (it has a refcounted base) #

Patch Set 12 : make a fake kNotificationOriginUrl to make origin check in notification manager happy #

Unified diffs Side-by-side diffs Delta from patch set Stats (+511 lines, -0 lines) Patch
M ash/ash_strings.grd View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/app/theme/theme_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/chrome_browser_main_chromeos.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/chrome_browser_main_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +4 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/power/peripheral_battery_observer.h View 1 2 3 4 5 6 7 1 chunk +99 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/power/peripheral_battery_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +239 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/power/peripheral_battery_observer_browsertest.cc View 1 2 3 4 5 6 7 8 1 chunk +158 lines, -0 lines 0 comments Download
M chrome/chrome_browser_chromeos.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
Yufeng Shen (Slow to review)
7 years, 8 months ago (2013-04-05 22:22:56 UTC) #1
Jun Mukai
just nitpicks https://codereview.chromium.org/13638018/diff/1/chrome/app/theme/theme_resources.grd File chrome/app/theme/theme_resources.grd (right): https://codereview.chromium.org/13638018/diff/1/chrome/app/theme/theme_resources.grd#newcode513 chrome/app/theme/theme_resources.grd:513: </if> CQ doesn't support binary files like ...
7 years, 8 months ago (2013-04-06 01:11:56 UTC) #2
Daniel Erat
https://codereview.chromium.org/13638018/diff/5003/chrome/browser/chromeos/power/peripheral_battery_observer.cc File chrome/browser/chromeos/power/peripheral_battery_observer.cc (right): https://codereview.chromium.org/13638018/diff/5003/chrome/browser/chromeos/power/peripheral_battery_observer.cc#newcode28 chrome/browser/chromeos/power/peripheral_battery_observer.cc:28: const int kLowBatteryLevel = 15; add comments describing what ...
7 years, 8 months ago (2013-04-06 01:52:34 UTC) #3
Yufeng Shen (Slow to review)
PTAL https://codereview.chromium.org/13638018/diff/1/chrome/app/theme/theme_resources.grd File chrome/app/theme/theme_resources.grd (right): https://codereview.chromium.org/13638018/diff/1/chrome/app/theme/theme_resources.grd#newcode513 chrome/app/theme/theme_resources.grd:513: </if> On 2013/04/06 01:11:56, Jun Mukai wrote: > ...
7 years, 8 months ago (2013-04-09 00:45:07 UTC) #4
Daniel Erat
can you add unit tests for PeripheralBatteryObserver? https://codereview.chromium.org/13638018/diff/22001/ash/ash_strings.grd File ash/ash_strings.grd (right): https://codereview.chromium.org/13638018/diff/22001/ash/ash_strings.grd#newcode461 ash/ash_strings.grd:461: Battery Low ...
7 years, 8 months ago (2013-04-09 02:06:18 UTC) #5
Yufeng Shen (Slow to review)
PTAL, thanks. https://codereview.chromium.org/13638018/diff/22001/ash/ash_strings.grd File ash/ash_strings.grd (right): https://codereview.chromium.org/13638018/diff/22001/ash/ash_strings.grd#newcode461 ash/ash_strings.grd:461: Battery Low (<ph name="percentage">$1<ex>56</ex></ph>%) On 2013/04/09 02:06:18, ...
7 years, 8 months ago (2013-04-10 05:54:08 UTC) #6
Daniel Erat
https://codereview.chromium.org/13638018/diff/29001/chrome/browser/chromeos/chrome_browser_main_chromeos.cc File chrome/browser/chromeos/chrome_browser_main_chromeos.cc (right): https://codereview.chromium.org/13638018/diff/29001/chrome/browser/chromeos/chrome_browser_main_chromeos.cc#newcode379 chrome/browser/chromeos/chrome_browser_main_chromeos.cc:379: peripheral_battery_observer_.reset(); can this be moved to line 748, where ...
7 years, 8 months ago (2013-04-10 12:58:21 UTC) #7
Yufeng Shen (Slow to review)
https://codereview.chromium.org/13638018/diff/29001/chrome/browser/chromeos/chrome_browser_main_chromeos.cc File chrome/browser/chromeos/chrome_browser_main_chromeos.cc (right): https://codereview.chromium.org/13638018/diff/29001/chrome/browser/chromeos/chrome_browser_main_chromeos.cc#newcode379 chrome/browser/chromeos/chrome_browser_main_chromeos.cc:379: peripheral_battery_observer_.reset(); On 2013/04/10 12:58:21, Daniel Erat wrote: > can ...
7 years, 8 months ago (2013-04-10 18:13:46 UTC) #8
Daniel Erat
https://codereview.chromium.org/13638018/diff/29001/chrome/browser/chromeos/power/peripheral_battery_observer_browsertest.cc File chrome/browser/chromeos/power/peripheral_battery_observer_browsertest.cc (right): https://codereview.chromium.org/13638018/diff/29001/chrome/browser/chromeos/power/peripheral_battery_observer_browsertest.cc#newcode45 chrome/browser/chromeos/power/peripheral_battery_observer_browsertest.cc:45: EXPECT_CALL(*mock_dbus_thread_manager->mock_update_engine_client(), On 2013/04/10 18:13:46, Yufeng Shen wrote: > On ...
7 years, 8 months ago (2013-04-10 18:21:35 UTC) #9
Yufeng Shen (Slow to review)
https://codereview.chromium.org/13638018/diff/29001/chrome/browser/chromeos/power/peripheral_battery_observer_browsertest.cc File chrome/browser/chromeos/power/peripheral_battery_observer_browsertest.cc (right): https://codereview.chromium.org/13638018/diff/29001/chrome/browser/chromeos/power/peripheral_battery_observer_browsertest.cc#newcode45 chrome/browser/chromeos/power/peripheral_battery_observer_browsertest.cc:45: EXPECT_CALL(*mock_dbus_thread_manager->mock_update_engine_client(), On 2013/04/10 18:21:35, Daniel Erat wrote: > On ...
7 years, 8 months ago (2013-04-10 20:02:01 UTC) #10
Daniel Erat
lgtm
7 years, 8 months ago (2013-04-10 20:07:59 UTC) #11
Yufeng Shen (Slow to review)
cc sky@ for OWNERS
7 years, 8 months ago (2013-04-10 20:33:07 UTC) #12
sky
I'm sounding like a broken record. What do you need me to review?
7 years, 8 months ago (2013-04-10 21:22:06 UTC) #13
miletus1
cc oshima@ for OWNERS of chrome/app/theme/* hope this time I am getting the right person
7 years, 8 months ago (2013-04-10 21:52:13 UTC) #14
oshima
chrome/app/theme lgtm
7 years, 8 months ago (2013-04-10 22:13:50 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miletus@chromium.org/13638018/51001
7 years, 8 months ago (2013-04-11 04:19:34 UTC) #16
commit-bot: I haz the power
Presubmit check for 13638018-51001 failed and returned exit status 1. INFO:root:Found 9 file(s). Running presubmit ...
7 years, 8 months ago (2013-04-11 04:19:44 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miletus@chromium.org/13638018/60001
7 years, 8 months ago (2013-04-11 04:33:28 UTC) #18
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 8 months ago (2013-04-11 04:58:14 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miletus@chromium.org/13638018/71001
7 years, 8 months ago (2013-04-11 05:51:07 UTC) #20
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=102171
7 years, 8 months ago (2013-04-11 07:40:25 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miletus@chromium.org/13638018/83001
7 years, 8 months ago (2013-04-11 18:18:12 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miletus@chromium.org/13638018/83001
7 years, 8 months ago (2013-04-11 18:18:30 UTC) #23
commit-bot: I haz the power
7 years, 8 months ago (2013-04-11 23:36:55 UTC) #24
Message was sent while issue was closed.
Change committed as 193802

Powered by Google App Engine
This is Rietveld 408576698