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

Issue 2492063002: chromeos: Simplify ShutdownPolicyHandler

Created:
4 years, 1 month ago by James Cook
Modified:
4 years, 1 month ago
Reviewers:
Daniel Erat
CC:
chromium-reviews, alemate+watch_chromium.org, sadrul, achuith+watch_chromium.org, oshima+watch_chromium.org, kalyank, davemoore+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

chromeos: Simplify ShutdownPolicyHandler This is preparation for moving the actual shutdown code into ash. ShutdownPolicyHandler observes the kRebootOnShutdown policy setting. It notifies observers in OOBE and the ash system tray when the value changes. It also has a callback-based interface to get the current value. Simplify the implementation by eliminating the callback-based interface and only using the delegate. BUG=644348, 647412 TEST=chrome unit_tests, instrumenting the code to manually change the policy setting and observing the tooltips on the shutdown button

Patch Set 1 #

Patch Set 2 : unused typedef #

Total comments: 2

Patch Set 3 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -85 lines) Patch
M ash/common/system/date/date_default_view.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ash/common/system/tiles/tiles_default_view.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ash/common/system/tray/system_tray_delegate.h View 1 2 2 chunks +3 lines, -4 lines 0 comments Download
M ash/common/system/tray/system_tray_delegate.cc View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/chromeos/settings/shutdown_policy_handler.h View 3 chunks +3 lines, -16 lines 0 comments Download
M chrome/browser/chromeos/settings/shutdown_policy_handler.cc View 1 chunk +11 lines, -25 lines 0 comments Download
M chrome/browser/chromeos/settings/shutdown_policy_handler_unittest.cc View 3 chunks +14 lines, -27 lines 0 comments Download
M chrome/browser/ui/ash/system_tray_delegate_chromeos.h View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/ash/system_tray_delegate_chromeos.cc View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/oobe_ui.cc View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 9 (6 generated)
James Cook
Dan, please take a look. https://codereview.chromium.org/2492063002/diff/20001/ash/common/system/tiles/tiles_default_view.cc File ash/common/system/tiles/tiles_default_view.cc (right): https://codereview.chromium.org/2492063002/diff/20001/ash/common/system/tiles/tiles_default_view.cc#newcode116 ash/common/system/tiles/tiles_default_view.cc:116: #endif // !defined(OS_WIN) FYI ...
4 years, 1 month ago (2016-11-10 23:33:55 UTC) #2
Daniel Erat
lgtm with a naming question https://codereview.chromium.org/2492063002/diff/20001/chrome/browser/chromeos/settings/shutdown_policy_handler.h File chrome/browser/chromeos/settings/shutdown_policy_handler.h (right): https://codereview.chromium.org/2492063002/diff/20001/chrome/browser/chromeos/settings/shutdown_policy_handler.h#newcode35 chrome/browser/chromeos/settings/shutdown_policy_handler.h:35: void CheckIfRebootOnShutdown(); just thinking ...
4 years, 1 month ago (2016-11-11 00:13:00 UTC) #7
James Cook
4 years, 1 month ago (2016-11-11 17:34:04 UTC) #9
Thanks for the quick review. I'm going to hold off on landing this for now. It
looks like my follow-up patch to move shutdown code into //ash is going to touch
almost all of these lines again, so it's probably not worth the churn to land
two patches. I'll see how it goes.

Powered by Google App Engine
This is Rietveld 408576698