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

Unified Diff: chrome/browser/chromeos/settings/shutdown_policy_handler.h

Issue 2492063002: chromeos: Simplify ShutdownPolicyHandler
Patch Set: unused typedef Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/settings/shutdown_policy_handler.h
diff --git a/chrome/browser/chromeos/settings/shutdown_policy_handler.h b/chrome/browser/chromeos/settings/shutdown_policy_handler.h
index a13dfe9bf6c74de7b2d242a779b2962127f8ef86..30531e169ee4229442dd535534e35262cc5e2459 100644
--- a/chrome/browser/chromeos/settings/shutdown_policy_handler.h
+++ b/chrome/browser/chromeos/settings/shutdown_policy_handler.h
@@ -7,7 +7,6 @@
#include <memory>
-#include "base/callback_forward.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
@@ -19,11 +18,6 @@ namespace chromeos {
// calling its OnShutdownPolicyChanged method with the new state of the policy.
class ShutdownPolicyHandler {
public:
- // This callback is passed to CheckIfRebootOnShutdown, which invokes it with
- // the current state of the |DeviceRebootOnShutdown| policy once a trusted of
- // policies is established.
- using RebootOnShutdownCallback = base::Callback<void(bool)>;
-
// This delegate is called when the |DeviceRebootOnShutdown| policy changes.
class Delegate {
public:
@@ -36,18 +30,11 @@ class ShutdownPolicyHandler {
ShutdownPolicyHandler(CrosSettings* cros_settings, Delegate* delegate);
~ShutdownPolicyHandler();
- // Once a trusted set of policies is established, this function calls
- // |callback| with the trusted state of the |DeviceRebootOnShutdown| policy.
- void CheckIfRebootOnShutdown(const RebootOnShutdownCallback& callback);
-
- // Resets the policy subscription and clears the delegate.
- void Shutdown();
+ // Once a trusted set of policies is established, this function notifies the
+ // |delegate_| with the trusted state of the |DeviceRebootOnShutdown| policy.
+ void CheckIfRebootOnShutdown();
Daniel Erat 2016/11/11 00:13:00 just thinking aloud here, but would a name like No
private:
- void CallDelegate(bool reboot_on_shutdown);
-
- void OnShutdownPolicyChanged();
-
CrosSettings* cros_settings_;
Delegate* delegate_;

Powered by Google App Engine
This is Rietveld 408576698