|
|
chromeos: Move device shutdown handling out of chrome into ash
Historically device shutdown was handled in chrome because it needed to check
a device "reboot on shutdown" policy during the shutdown process. Under mustash
it is possible to quit the chrome browser and leave ash running, but the old
code required launching chrome in order to shut down.
Moving the code into ash also reduces ash/chrome dependencies and simplifies
the SystemTrayDelegate code I'm trying to refactor.
* The system tray shutdown button computes its "shutdown" vs "reboot" each time
the menu is opened. It no longer changes its tooltip if the policy changed while
the menu was open. The old behavior seemed unnecessary, and doing it this way
avoids a set of policy observers in ash.
* Chrome observes the shutdown policy via ShutdownPolicyHandler. It sends the
initial value to ash via the ash::mojom::ShutdownController mojo interface.
Subsequent policy updates are sent over the same interface.
This partially reverts the ShutdownClient implementation introduced in
https://codereview.chromium.org/2471643002
BUG= 647412, 628792
TEST=ash_unittests, chrome unit_tests and browser_tests (ShutdownPolicy*) and
manual testing on device
Committed: https://crrev.com/d9f152f1d2e35a35a726a3891c00a764de144b39
Cr-Commit-Position: refs/heads/master@{#432035}
Total comments: 5
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+347 lines, -535 lines) |
Patch |
 |
M |
ash/BUILD.gn
|
View
|
1
2
3
|
3 chunks |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
ash/common/mojo_interface_factory.cc
|
View
|
|
3 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
A |
ash/common/shutdown_controller.h
|
View
|
1
2
|
1 chunk |
+49 lines, -0 lines |
0 comments
|
Download
|
 |
A |
ash/common/shutdown_controller.cc
|
View
|
1
2
|
1 chunk |
+47 lines, -0 lines |
0 comments
|
Download
|
 |
D |
ash/common/system/chromeos/shutdown_policy_observer.h
|
View
|
|
1 chunk |
+0 lines, -24 lines |
0 comments
|
Download
|
 |
M |
ash/common/system/date/date_default_view.h
|
View
|
|
4 chunks |
+1 line, -9 lines |
0 comments
|
Download
|
 |
M |
ash/common/system/date/date_default_view.cc
|
View
|
|
5 chunks |
+8 lines, -23 lines |
0 comments
|
Download
|
 |
M |
ash/common/system/tiles/tiles_default_view.h
|
View
|
|
4 chunks |
+1 line, -9 lines |
0 comments
|
Download
|
 |
M |
ash/common/system/tiles/tiles_default_view.cc
|
View
|
|
4 chunks |
+8 lines, -24 lines |
0 comments
|
Download
|
 |
M |
ash/common/system/tiles/tray_tiles.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
ash/common/system/tiles/tray_tiles.cc
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ash/common/system/tray/system_tray_delegate.h
|
View
|
|
3 chunks |
+0 lines, -15 lines |
0 comments
|
Download
|
 |
M |
ash/common/system/tray/system_tray_delegate.cc
|
View
|
|
1 chunk |
+0 lines, -9 lines |
0 comments
|
Download
|
 |
M |
ash/common/wm_shell.h
|
View
|
|
3 chunks |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ash/common/wm_shell.cc
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ash/mus/manifest.json
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
ash/public/interfaces/shutdown.mojom
|
View
|
|
1 chunk |
+7 lines, -9 lines |
0 comments
|
Download
|
 |
M |
ash/shell.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ash/test/BUILD.gn
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ash/test/lock_state_controller_test_api.h
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
ash/test/lock_state_controller_test_api.cc
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
 |
D |
ash/test/test_shutdown_client.h
|
View
|
|
1 chunk |
+0 lines, -35 lines |
0 comments
|
Download
|
 |
D |
ash/test/test_shutdown_client.cc
|
View
|
|
1 chunk |
+0 lines, -19 lines |
0 comments
|
Download
|
 |
M |
ash/wm/lock_state_controller.h
|
View
|
1
|
3 chunks |
+4 lines, -10 lines |
0 comments
|
Download
|
 |
M |
ash/wm/lock_state_controller.cc
|
View
|
1
|
4 chunks |
+7 lines, -21 lines |
0 comments
|
Download
|
 |
M |
ash/wm/lock_state_controller_unittest.cc
|
View
|
1
|
7 chunks |
+21 lines, -8 lines |
0 comments
|
Download
|
 |
D |
ash/wm/shutdown_client_proxy.h
|
View
|
|
1 chunk |
+0 lines, -37 lines |
0 comments
|
Download
|
 |
D |
ash/wm/shutdown_client_proxy.cc
|
View
|
|
1 chunk |
+0 lines, -23 lines |
0 comments
|
Download
|
 |
M |
chrome/app/mash/chrome_mash_content_browser_manifest_overlay.json
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/chrome_content_browser_manifest_overlay.json
|
View
|
1
2
3
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/BUILD.gn
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/chrome_browser_main_chromeos.h
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/chrome_browser_main_chromeos.cc
|
View
|
|
3 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/chrome_interface_factory.cc
|
View
|
|
4 chunks |
+3 lines, -12 lines |
0 comments
|
Download
|
 |
D |
chrome/browser/chromeos/power/shutdown_client_impl.h
|
View
|
|
1 chunk |
+0 lines, -30 lines |
0 comments
|
Download
|
 |
D |
chrome/browser/chromeos/power/shutdown_client_impl.cc
|
View
|
|
1 chunk |
+0 lines, -38 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/chromeos/settings/shutdown_policy_forwarder.h
|
View
|
|
1 chunk |
+30 lines, -0 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/chromeos/settings/shutdown_policy_forwarder.cc
|
View
|
|
1 chunk |
+43 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/settings/shutdown_policy_handler.h
|
View
|
|
2 chunks |
+4 lines, -15 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/settings/shutdown_policy_handler.cc
|
View
|
|
1 chunk |
+10 lines, -26 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/settings/shutdown_policy_handler_unittest.cc
|
View
|
|
3 chunks |
+13 lines, -30 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/shutdown_policy_browsertest.cc
|
View
|
|
1 chunk |
+44 lines, -48 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/ash/system_tray_delegate_chromeos.h
|
View
|
1
2
3
|
5 chunks |
+0 lines, -14 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
|
View
|
1
2
3
|
5 chunks |
+0 lines, -26 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/chromeos/login/oobe_ui.h
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
Total messages: 22 (13 generated)
|