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

Issue 776093004: Add device policy to disallow shutdown (Closed)

Created:
6 years ago by cschuet (SLOW)
Modified:
6 years ago
CC:
chromium-reviews, sadrul, nkostylev+watch_chromium.org, dzhioev+watch_chromium.org, asvitkine+watch_chromium.org, oshima+watch_chromium.org, kalyank, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Add device policy to disallow shutdown This CL introduces a new boolean device policy kDeviceShutdownIsReboot. BUG=312541 TESTS=unit_tests Committed: https://crrev.com/581f2e14651eda89ef76009dab4f7d8d688766f5 Cr-Commit-Position: refs/heads/master@{#308624}

Patch Set 1 #

Total comments: 11

Patch Set 2 : modifications suggested by +derat #

Patch Set 3 : modifications suggested by stevenjb #

Total comments: 58

Patch Set 4 : Modifications suggested by bartfab + => RebootOnShutdown #

Patch Set 5 : #

Total comments: 34

Patch Set 6 : Adressed bartfab's comments #

Total comments: 6

Patch Set 7 : bartfab's commentw #

Patch Set 8 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+412 lines, -64 lines) Patch
M ash/metrics/user_metrics_recorder.h View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M ash/metrics/user_metrics_recorder.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M ash/test/test_lock_state_controller_delegate.h View 1 chunk +2 lines, -0 lines 0 comments Download
M ash/test/test_lock_state_controller_delegate.cc View 2 chunks +5 lines, -0 lines 0 comments Download
M ash/wm/lock_state_controller.h View 5 chunks +13 lines, -5 lines 0 comments Download
M ash/wm/lock_state_controller.cc View 1 2 3 6 chunks +20 lines, -9 lines 0 comments Download
M ash/wm/lock_state_controller_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ash/wm/power_button_controller.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/proto/chrome_device_policy.proto View 1 2 3 4 5 6 7 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/power/session_state_controller_delegate_chromeos.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/power/session_state_controller_delegate_chromeos.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/settings/device_settings_provider.cc View 1 2 3 4 5 6 7 2 chunks +49 lines, -42 lines 0 comments Download
M chrome/browser/ui/ash/system_tray_delegate_chromeos.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
A chrome/browser/ui/webui/chromeos/login/shutdown_policy_observer.h View 1 2 3 4 5 1 chunk +63 lines, -0 lines 0 comments Download
A chrome/browser/ui/webui/chromeos/login/shutdown_policy_observer.cc View 1 2 3 1 chunk +58 lines, -0 lines 0 comments Download
A chrome/browser/ui/webui/chromeos/login/shutdown_policy_observer_unittest.cc View 1 2 3 4 5 6 1 chunk +128 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/policy/policy_test_cases.json View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M chromeos/settings/cros_settings_names.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/settings/cros_settings_names.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M components/policy/resources/policy_templates.json View 1 2 3 4 5 6 7 2 chunks +16 lines, -1 line 0 comments Download
M tools/metrics/actions/actions.xml View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 31 (8 generated)
cschuet (SLOW)
asvitkine@chromium.org: Please review changes in tools/metrics/* bartfab@chromium.org: Please review changes in chrome/browser/chromeos/policy/* components/policy/* thakis@chromium.org: Please ...
6 years ago (2014-12-05 17:03:56 UTC) #2
James Cook
Dan, can you look at ash/* for the shutdown vs. restart changes? The code looks ...
6 years ago (2014-12-05 18:50:08 UTC) #4
Daniel Erat
https://codereview.chromium.org/776093004/diff/1/ash/metrics/user_metrics_recorder.cc File ash/metrics/user_metrics_recorder.cc (right): https://codereview.chromium.org/776093004/diff/1/ash/metrics/user_metrics_recorder.cc#newcode66 ash/metrics/user_metrics_recorder.cc:66: case ash::UMA_ACCEL_RESTART_POWER_BUTTON: alphabetize https://codereview.chromium.org/776093004/diff/1/ash/metrics/user_metrics_recorder.h File ash/metrics/user_metrics_recorder.h (right): https://codereview.chromium.org/776093004/diff/1/ash/metrics/user_metrics_recorder.h#newcode113 ash/metrics/user_metrics_recorder.h:113: ...
6 years ago (2014-12-05 19:06:12 UTC) #5
stevenjb
chromeos/ lgtm w/ comment https://codereview.chromium.org/776093004/diff/1/chromeos/settings/cros_settings_names.cc File chromeos/settings/cros_settings_names.cc (right): https://codereview.chromium.org/776093004/diff/1/chromeos/settings/cros_settings_names.cc#newcode166 chromeos/settings/cros_settings_names.cc:166: const char kShutdownAllowed[] = "cros.device.shutdown_allowed"; ...
6 years ago (2014-12-05 20:30:48 UTC) #6
cschuet (SLOW)
https://codereview.chromium.org/776093004/diff/1/ash/metrics/user_metrics_recorder.cc File ash/metrics/user_metrics_recorder.cc (right): https://codereview.chromium.org/776093004/diff/1/ash/metrics/user_metrics_recorder.cc#newcode66 ash/metrics/user_metrics_recorder.cc:66: case ash::UMA_ACCEL_RESTART_POWER_BUTTON: On 2014/12/05 19:06:11, Daniel Erat wrote: > ...
6 years ago (2014-12-08 14:37:44 UTC) #7
Alexei Svitkine (slow)
metrics lgtm
6 years ago (2014-12-08 15:49:34 UTC) #8
cschuet (SLOW)
On 2014/12/05 20:30:48, stevenjb wrote: > chromeos/ lgtm w/ comment > > https://codereview.chromium.org/776093004/diff/1/chromeos/settings/cros_settings_names.cc > File ...
6 years ago (2014-12-08 15:59:09 UTC) #9
bartfab (slow)
https://codereview.chromium.org/776093004/diff/40001/ash/wm/lock_state_controller.cc File ash/wm/lock_state_controller.cc (left): https://codereview.chromium.org/776093004/diff/40001/ash/wm/lock_state_controller.cc#oldcode298 ash/wm/lock_state_controller.cc:298: VLOG(1) << "OnRealShutdownTimeout"; Why did you remove this? https://codereview.chromium.org/776093004/diff/40001/ash/wm/lock_state_controller.cc ...
6 years ago (2014-12-08 16:49:46 UTC) #10
Nico
Please get a chrome/browser/ui/webui/chromeos/login/OWNERS to look at the webui/chromeos/login code. other than that, chrome/ lgtm ...
6 years ago (2014-12-08 17:40:48 UTC) #11
cschuet (SLOW)
https://codereview.chromium.org/776093004/diff/40001/ash/wm/lock_state_controller.cc File ash/wm/lock_state_controller.cc (left): https://codereview.chromium.org/776093004/diff/40001/ash/wm/lock_state_controller.cc#oldcode298 ash/wm/lock_state_controller.cc:298: VLOG(1) << "OnRealShutdownTimeout"; On 2014/12/08 16:49:44, bartfab wrote: > ...
6 years ago (2014-12-08 18:57:05 UTC) #12
cschuet (SLOW)
On 2014/12/08 17:40:48, Nico wrote: > Please get a chrome/browser/ui/webui/chromeos/login/OWNERS to look at the > ...
6 years ago (2014-12-08 19:06:26 UTC) #14
Dmitry Polukhin
LGTM chrome/browser/ui/webui/chromeos/login/*
6 years ago (2014-12-09 08:33:31 UTC) #15
cschuet (SLOW)
I am sorry Dan, it seems I overlook one of your comments. Now done. https://codereview.chromium.org/776093004/diff/1/ash/metrics/user_metrics_recorder.h ...
6 years ago (2014-12-09 08:50:11 UTC) #16
Daniel Erat
lgtm https://codereview.chromium.org/776093004/diff/1/chrome/browser/chromeos/settings/device_settings_provider.cc File chrome/browser/chromeos/settings/device_settings_provider.cc (right): https://codereview.chromium.org/776093004/diff/1/chrome/browser/chromeos/settings/device_settings_provider.cc#newcode42 chrome/browser/chromeos/settings/device_settings_provider.cc:42: kAccountsPrefAllowGuest, On 2014/12/09 08:50:11, cschuet wrote: > On ...
6 years ago (2014-12-09 16:00:36 UTC) #17
bartfab (slow)
https://codereview.chromium.org/776093004/diff/80001/chrome/browser/chromeos/policy/proto/chrome_device_policy.proto File chrome/browser/chromeos/policy/proto/chrome_device_policy.proto (right): https://codereview.chromium.org/776093004/diff/80001/chrome/browser/chromeos/policy/proto/chrome_device_policy.proto#newcode587 chrome/browser/chromeos/policy/proto/chrome_device_policy.proto:587: // Determines whether the device may be shut down. ...
6 years ago (2014-12-15 18:01:57 UTC) #18
cschuet (SLOW)
https://codereview.chromium.org/776093004/diff/80001/chrome/browser/chromeos/policy/proto/chrome_device_policy.proto File chrome/browser/chromeos/policy/proto/chrome_device_policy.proto (right): https://codereview.chromium.org/776093004/diff/80001/chrome/browser/chromeos/policy/proto/chrome_device_policy.proto#newcode587 chrome/browser/chromeos/policy/proto/chrome_device_policy.proto:587: // Determines whether the device may be shut down. ...
6 years ago (2014-12-16 10:02:08 UTC) #19
bartfab (slow)
LGTM with a couple of final nits. https://codereview.chromium.org/776093004/diff/80001/chrome/browser/ui/webui/chromeos/login/shutdown_policy_observer_unittest.cc File chrome/browser/ui/webui/chromeos/login/shutdown_policy_observer_unittest.cc (right): https://codereview.chromium.org/776093004/diff/80001/chrome/browser/ui/webui/chromeos/login/shutdown_policy_observer_unittest.cc#newcode28 chrome/browser/ui/webui/chromeos/login/shutdown_policy_observer_unittest.cc:28: void ResultCallback(bool ...
6 years ago (2014-12-16 10:24:42 UTC) #20
cschuet (SLOW)
https://codereview.chromium.org/776093004/diff/80001/chrome/browser/ui/webui/chromeos/login/shutdown_policy_observer_unittest.cc File chrome/browser/ui/webui/chromeos/login/shutdown_policy_observer_unittest.cc (right): https://codereview.chromium.org/776093004/diff/80001/chrome/browser/ui/webui/chromeos/login/shutdown_policy_observer_unittest.cc#newcode28 chrome/browser/ui/webui/chromeos/login/shutdown_policy_observer_unittest.cc:28: void ResultCallback(bool actual_reboot_on_shutdown) { On 2014/12/16 10:24:42, bartfab wrote: ...
6 years ago (2014-12-16 10:53:00 UTC) #21
bartfab (slow)
Still LGTM.
6 years ago (2014-12-16 11:03:02 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/776093004/120001
6 years ago (2014-12-16 17:38:53 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/776093004/140001
6 years ago (2014-12-16 18:04:55 UTC) #29
commit-bot: I haz the power
Committed patchset #8 (id:140001)
6 years ago (2014-12-16 19:04:11 UTC) #30
commit-bot: I haz the power
6 years ago (2014-12-16 19:04:55 UTC) #31
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/581f2e14651eda89ef76009dab4f7d8d688766f5
Cr-Commit-Position: refs/heads/master@{#308624}

Powered by Google App Engine
This is Rietveld 408576698