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

Issue 727363002: Fire notifications when reboot is requested, not scheduled (Closed)

Created:
6 years, 1 month ago by bartfab (slow)
Modified:
6 years, 1 month ago
Reviewers:
xiyuan
CC:
chromium-reviews, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, oshima+watch_chromium.org, nkostylev+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@managed_cros
Project:
chromium
Visibility:
Public.

Description

Fire notifications when reboot is requested, not scheduled This CL fixes two bugs in the original implementation of the runtime.onRestartRequired() notification: 1) Fire a notification when a reboot is requested, not scheduled. 2) Fix race at start-up, ensuring that reboots scheduled before observer registration are not missed. BUG=433811 TEST=Updated and extended unit and browser tests Committed: https://crrev.com/89aa682cd901d837e84369d65480fa0806923ea1 Cr-Commit-Position: refs/heads/master@{#304838}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Addressed comments. #

Total comments: 2

Patch Set 3 : Made observers explicitly unregister themselves. #

Patch Set 4 : Fix race against GetSystemEventTimes() at start-up. #

Patch Set 5 : Remove use of content::RunAllBlockingPoolTasksUntilIdle(), which must only be used to clean up afte… #

Patch Set 6 : Wait for the AutomaticRebootManager to finish initializing before starting the test. #

Patch Set 7 : Added debug logging. #

Patch Set 8 : Fix typo. #

Patch Set 9 : More debugging. We are getting closer now. #

Patch Set 10 : More debugging. #

Patch Set 11 : More debugging. #

Patch Set 12 : Fix the source of the flakes. #

Patch Set 13 : Moved mock uptime and uptime limit further away from the minimum uptime of 1h enforced by Chrome OS. #

Patch Set 14 : Removed debug logging. Ready for re-review. #

Total comments: 2

Patch Set 15 : Add missing run_loop.Run(); #

Unified diffs Side-by-side diffs Delta from patch set Stats (+679 lines, -248 lines) Patch
M chrome/browser/chromeos/app_mode/app_session_lifetime.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/app_mode/kiosk_app_update_service.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc View 1 2 4 chunks +14 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/app_mode/kiosk_app_update_service_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +118 lines, -16 lines 0 comments Download
M chrome/browser/chromeos/system/automatic_reboot_manager.h View 1 2 4 chunks +9 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/system/automatic_reboot_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 10 chunks +16 lines, -12 lines 0 comments Download
M chrome/browser/chromeos/system/automatic_reboot_manager_observer.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc View 1 2 87 chunks +516 lines, -210 lines 0 comments Download

Messages

Total messages: 27 (7 generated)
bartfab (slow)
Hi Xiyuan, Could you take a look please?
6 years, 1 month ago (2014-11-17 12:48:22 UTC) #2
xiyuan
https://codereview.chromium.org/727363002/diff/1/chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc File chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc (left): https://codereview.chromium.org/727363002/diff/1/chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc#oldcode118 chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc:118: automatic_reboot_manager_->RemoveObserver(this); Why do we need to remove this? https://codereview.chromium.org/727363002/diff/1/chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc ...
6 years, 1 month ago (2014-11-17 18:42:52 UTC) #3
bartfab (slow)
https://codereview.chromium.org/727363002/diff/1/chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc File chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc (left): https://codereview.chromium.org/727363002/diff/1/chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc#oldcode118 chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc:118: automatic_reboot_manager_->RemoveObserver(this); On 2014/11/17 18:42:52, xiyuan wrote: > Why do ...
6 years, 1 month ago (2014-11-17 19:58:24 UTC) #4
xiyuan
LGTM https://codereview.chromium.org/727363002/diff/1/chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc File chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc (left): https://codereview.chromium.org/727363002/diff/1/chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc#oldcode118 chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc:118: automatic_reboot_manager_->RemoveObserver(this); On 2014/11/17 19:58:24, bartfab wrote: > On ...
6 years, 1 month ago (2014-11-17 20:08:03 UTC) #5
bartfab (slow)
https://codereview.chromium.org/727363002/diff/1/chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc File chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc (left): https://codereview.chromium.org/727363002/diff/1/chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc#oldcode118 chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc:118: automatic_reboot_manager_->RemoveObserver(this); On 2014/11/17 20:08:03, xiyuan wrote: > On 2014/11/17 ...
6 years, 1 month ago (2014-11-18 11:04:47 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/727363002/40001
6 years, 1 month ago (2014-11-18 11:06:36 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/431)
6 years, 1 month ago (2014-11-18 11:57:27 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/727363002/60001
6 years, 1 month ago (2014-11-18 13:19:14 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/446)
6 years, 1 month ago (2014-11-18 14:11:02 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/727363002/80001
6 years, 1 month ago (2014-11-18 16:19:07 UTC) #16
commit-bot: I haz the power
Committed patchset #5 (id:80001)
6 years, 1 month ago (2014-11-18 16:59:20 UTC) #17
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/2bdfb49a86c46ac3a8a953a1e2f4e8e1bb41dc02 Cr-Commit-Position: refs/heads/master@{#304624}
6 years, 1 month ago (2014-11-18 17:00:07 UTC) #18
sky
A revert of this CL (patchset #5 id:80001) has been created in https://codereview.chromium.org/741473002/ by sky@chromium.org. ...
6 years, 1 month ago (2014-11-18 17:58:32 UTC) #19
bartfab (slow)
Hi Xiyuan, Please take another look. The newest version of this CL fixes two problems: ...
6 years, 1 month ago (2014-11-18 21:47:37 UTC) #20
xiyuan
Mostly good. Thank you for digging and get to the bottom of this. https://codereview.chromium.org/727363002/diff/250001/chrome/browser/chromeos/app_mode/kiosk_app_update_service_browsertest.cc File ...
6 years, 1 month ago (2014-11-18 22:37:16 UTC) #21
bartfab (slow)
https://codereview.chromium.org/727363002/diff/250001/chrome/browser/chromeos/app_mode/kiosk_app_update_service_browsertest.cc File chrome/browser/chromeos/app_mode/kiosk_app_update_service_browsertest.cc (right): https://codereview.chromium.org/727363002/diff/250001/chrome/browser/chromeos/app_mode/kiosk_app_update_service_browsertest.cc#newcode112 chrome/browser/chromeos/app_mode/kiosk_app_update_service_browsertest.cc:112: base::RunLoop().RunUntilIdle(); On 2014/11/18 22:37:16, xiyuan wrote: > Should we ...
6 years, 1 month ago (2014-11-19 09:21:09 UTC) #22
xiyuan
LGTM++
6 years, 1 month ago (2014-11-19 17:20:58 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/727363002/270001
6 years, 1 month ago (2014-11-19 17:26:31 UTC) #25
commit-bot: I haz the power
Committed patchset #15 (id:270001)
6 years, 1 month ago (2014-11-19 18:09:07 UTC) #26
commit-bot: I haz the power
6 years, 1 month ago (2014-11-19 18:10:00 UTC) #27
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/89aa682cd901d837e84369d65480fa0806923ea1
Cr-Commit-Position: refs/heads/master@{#304838}

Powered by Google App Engine
This is Rietveld 408576698