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

Unified Diff: chrome/browser/chromeos/system/automatic_reboot_manager.h

Issue 16844020: app_mode: Add runtime.onRestartRequired event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments in #1, add test and remove onBrowserUpdateAvailable Created 7 years, 6 months 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/system/automatic_reboot_manager.h
diff --git a/chrome/browser/chromeos/system/automatic_reboot_manager.h b/chrome/browser/chromeos/system/automatic_reboot_manager.h
index 9d292626e9af60a6313da2791f378e37c3b631f2..4892f6fb3d4dbb3d1c801fc6bed37e57f65a30f9 100644
--- a/chrome/browser/chromeos/system/automatic_reboot_manager.h
+++ b/chrome/browser/chromeos/system/automatic_reboot_manager.h
@@ -10,6 +10,7 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "base/observer_list.h"
#include "base/prefs/pref_change_registrar.h"
#include "base/time.h"
#include "base/timer.h"
@@ -27,6 +28,8 @@ class TickClock;
namespace chromeos {
namespace system {
+class AutomaticRebootManagerObserver;
+
// Schedules and executes automatic reboots.
//
// Automatic reboots may be scheduled for any number of reasons. Currently, the
@@ -90,6 +93,9 @@ class AutomaticRebootManager : public PowerManagerClient::Observer,
explicit AutomaticRebootManager(scoped_ptr<base::TickClock> clock);
virtual ~AutomaticRebootManager();
+ void AddObserver(AutomaticRebootManagerObserver* observer);
+ void RemoveObserver(AutomaticRebootManagerObserver* observer);
+
// PowerManagerClient::Observer:
virtual void SystemResumed(const base::TimeDelta& sleep_duration) OVERRIDE;
@@ -160,6 +166,8 @@ class AutomaticRebootManager : public PowerManagerClient::Observer,
base::WeakPtrFactory<AutomaticRebootManager> weak_ptr_factory_;
+ ObserverList<AutomaticRebootManagerObserver, true> observers_;
+
DISALLOW_COPY_AND_ASSIGN(AutomaticRebootManager);
};

Powered by Google App Engine
This is Rietveld 408576698