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

Issue 2867073004: Battery listener for download service in native code. (Closed)

Created:
3 years, 7 months ago by xingliu
Modified:
3 years, 7 months ago
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Battery listener for download service in native code. We need to listen to battery change when Chrome is running. This class decouples the battery listening details from download service. Any underlying implementation change can be limited inside this class. In the future we may use device service to retrieve battery level, right now it seems only content can embbed the device service. BUG=717180 Review-Url: https://codereview.chromium.org/2867073004 Cr-Commit-Position: refs/heads/master@{#470676} Committed: https://chromium.googlesource.com/chromium/src/+/6aa839b75ec10cf23591c1dfc2f9b4b910102a8c

Patch Set 1 #

Patch Set 2 : Polish comments. #

Total comments: 12

Patch Set 3 : Work on feedbacks. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+193 lines, -0 lines) Patch
M components/download/internal/BUILD.gn View 2 chunks +4 lines, -0 lines 0 comments Download
A components/download/internal/scheduler/battery_listener.h View 1 2 1 chunk +59 lines, -0 lines 0 comments Download
A components/download/internal/scheduler/battery_listener.cc View 1 2 1 chunk +58 lines, -0 lines 0 comments Download
A components/download/internal/scheduler/battery_listener_unittest.cc View 1 2 1 chunk +72 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (15 generated)
xingliu
Hi, PTAL, thanks.
3 years, 7 months ago (2017-05-09 03:05:37 UTC) #4
David Trainor- moved to gerrit
lgtm https://codereview.chromium.org/2867073004/diff/20001/components/download/internal/scheduler/battery_listener.cc File components/download/internal/scheduler/battery_listener.cc (right): https://codereview.chromium.org/2867073004/diff/20001/components/download/internal/scheduler/battery_listener.cc#newcode52 components/download/internal/scheduler/battery_listener.cc:52: for (auto it = observers_.begin(); it != observers_.end(); ...
3 years, 7 months ago (2017-05-09 06:03:31 UTC) #5
qinmin
lgtm % comments https://codereview.chromium.org/2867073004/diff/20001/components/download/internal/scheduler/battery_listener.cc File components/download/internal/scheduler/battery_listener.cc (right): https://codereview.chromium.org/2867073004/diff/20001/components/download/internal/scheduler/battery_listener.cc#newcode21 components/download/internal/scheduler/battery_listener.cc:21: BatteryListener::~BatteryListener() = default; should this call ...
3 years, 7 months ago (2017-05-09 17:48:11 UTC) #6
xingliu
Thanks for the feedback. https://codereview.chromium.org/2867073004/diff/20001/components/download/internal/scheduler/battery_listener.cc File components/download/internal/scheduler/battery_listener.cc (right): https://codereview.chromium.org/2867073004/diff/20001/components/download/internal/scheduler/battery_listener.cc#newcode21 components/download/internal/scheduler/battery_listener.cc:21: BatteryListener::~BatteryListener() = default; On 2017/05/09 ...
3 years, 7 months ago (2017-05-09 18:34:39 UTC) #7
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/2867073004/40001
3 years, 7 months ago (2017-05-10 17:05:03 UTC) #18
commit-bot: I haz the power
3 years, 7 months ago (2017-05-10 19:50:28 UTC) #21
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/6aa839b75ec10cf23591c1dfc2f9...

Powered by Google App Engine
This is Rietveld 408576698