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

Issue 2695223008: [Chromecast] Add an alarm manager for firing events on wall clock time. (Closed)

Created:
3 years, 10 months ago by ryanchung
Modified:
3 years, 10 months ago
Reviewers:
dougsteed, halliwell
CC:
chromium-reviews, alokp+watch_chromium.org, lcwu+watch_chromium.org, halliwell+watch_chromium.org, Simeon
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Chromecast] Add an alarm manager for firing events on wall clock time. PostDelayedTask is subject to time changes, clock drifts, and other factors. Long duration tasks are even more sensitive. Polling the wall clock every 5 seconds will allow execution close to the requested time. If the process is suspended, the task will fire within 5 seconds of being woken up. BUG= internal b/33114736 Review-Url: https://codereview.chromium.org/2695223008 Cr-Commit-Position: refs/heads/master@{#452335} Committed: https://chromium.googlesource.com/chromium/src/+/3aeb76a311e61823dd4d6602bd0c213be085aba9

Patch Set 1 #

Total comments: 14

Patch Set 2 : Addresses comments #

Total comments: 10

Patch Set 3 : Fixed nits #

Patch Set 4 : Use caller's thread #

Total comments: 4

Patch Set 5 : Fixed nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+648 lines, -0 lines) Patch
M chromecast/base/BUILD.gn View 2 chunks +3 lines, -0 lines 0 comments Download
A chromecast/base/alarm_manager.h View 1 2 3 4 1 chunk +113 lines, -0 lines 0 comments Download
A chromecast/base/alarm_manager.cc View 1 2 3 4 1 chunk +79 lines, -0 lines 0 comments Download
A chromecast/base/alarm_manager_unittest.cc View 1 2 1 chunk +453 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (10 generated)
ryanchung
Please take a look. The overall goal is so that we can execute some tasks ...
3 years, 10 months ago (2017-02-17 04:17:50 UTC) #3
halliwell
https://codereview.chromium.org/2695223008/diff/1/chromecast/base/alarm_manager.h File chromecast/base/alarm_manager.h (right): https://codereview.chromium.org/2695223008/diff/1/chromecast/base/alarm_manager.h#newcode38 chromecast/base/alarm_manager.h:38: class AlarmDelegate { I wonder if it would be ...
3 years, 10 months ago (2017-02-20 22:28:26 UTC) #4
ryanchung
https://codereview.chromium.org/2695223008/diff/1/chromecast/base/alarm_manager.h File chromecast/base/alarm_manager.h (right): https://codereview.chromium.org/2695223008/diff/1/chromecast/base/alarm_manager.h#newcode38 chromecast/base/alarm_manager.h:38: class AlarmDelegate { On 2017/02/20 22:28:26, halliwell wrote: > ...
3 years, 10 months ago (2017-02-21 23:36:47 UTC) #5
halliwell
Ok, if instantiating/accessing the object isn't onerous, sounds ok to keep a single one. https://codereview.chromium.org/2695223008/diff/20001/chromecast/base/alarm_manager.cc ...
3 years, 10 months ago (2017-02-22 19:09:16 UTC) #6
ryanchung
https://codereview.chromium.org/2695223008/diff/20001/chromecast/base/alarm_manager.cc File chromecast/base/alarm_manager.cc (right): https://codereview.chromium.org/2695223008/diff/20001/chromecast/base/alarm_manager.cc#newcode23 chromecast/base/alarm_manager.cc:23: int kClockPollInterval = 5; On 2017/02/22 19:09:15, halliwell wrote: ...
3 years, 10 months ago (2017-02-22 19:39:39 UTC) #7
halliwell
https://codereview.chromium.org/2695223008/diff/20001/chromecast/base/alarm_manager.cc File chromecast/base/alarm_manager.cc (right): https://codereview.chromium.org/2695223008/diff/20001/chromecast/base/alarm_manager.cc#newcode39 chromecast/base/alarm_manager.cc:39: alarm_thread_.reset(new base::Thread("Cast_Alarm_Manager_Thread")); On 2017/02/22 19:39:39, ryanchung wrote: > On ...
3 years, 10 months ago (2017-02-22 19:42:43 UTC) #8
ryanchung
https://codereview.chromium.org/2695223008/diff/20001/chromecast/base/alarm_manager.cc File chromecast/base/alarm_manager.cc (right): https://codereview.chromium.org/2695223008/diff/20001/chromecast/base/alarm_manager.cc#newcode39 chromecast/base/alarm_manager.cc:39: alarm_thread_.reset(new base::Thread("Cast_Alarm_Manager_Thread")); On 2017/02/22 19:42:43, halliwell wrote: > On ...
3 years, 10 months ago (2017-02-22 19:51:12 UTC) #9
halliwell
lgtm % nits https://codereview.chromium.org/2695223008/diff/60001/chromecast/base/alarm_manager.cc File chromecast/base/alarm_manager.cc (right): https://codereview.chromium.org/2695223008/diff/60001/chromecast/base/alarm_manager.cc#newcode53 chromecast/base/alarm_manager.cc:53: clock_tick_timer_.reset(nullptr); nit: is this necessary? should ...
3 years, 10 months ago (2017-02-22 19:58:55 UTC) #10
ryanchung
https://codereview.chromium.org/2695223008/diff/60001/chromecast/base/alarm_manager.cc File chromecast/base/alarm_manager.cc (right): https://codereview.chromium.org/2695223008/diff/60001/chromecast/base/alarm_manager.cc#newcode53 chromecast/base/alarm_manager.cc:53: clock_tick_timer_.reset(nullptr); On 2017/02/22 19:58:55, halliwell wrote: > nit: is ...
3 years, 10 months ago (2017-02-22 21:36:36 UTC) #11
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/2695223008/80001
3 years, 10 months ago (2017-02-23 01:26:13 UTC) #18
commit-bot: I haz the power
3 years, 10 months ago (2017-02-23 01:43:21 UTC) #21
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/3aeb76a311e61823dd4d6602bd0c...

Powered by Google App Engine
This is Rietveld 408576698