Index: chrome/browser/chromeos/settings/device_settings_service.h |
diff --git a/chrome/browser/chromeos/settings/device_settings_service.h b/chrome/browser/chromeos/settings/device_settings_service.h |
index 5b055135ae86503a54bffa83d30985115b7f5214..e6714d0bb055e28813b87400cbfb927f9ab8ad0f 100644 |
--- a/chrome/browser/chromeos/settings/device_settings_service.h |
+++ b/chrome/browser/chromeos/settings/device_settings_service.h |
@@ -19,6 +19,8 @@ |
#include "chromeos/dbus/session_manager_client.h" |
#include "chromeos/tpm_token_loader.h" |
#include "components/policy/core/common/cloud/cloud_policy_validator.h" |
+#include "content/public/browser/notification_observer.h" |
+#include "content/public/browser/notification_registrar.h" |
#include "policy/proto/device_management_backend.pb.h" |
namespace crypto { |
@@ -79,7 +81,8 @@ class OwnerKey : public base::RefCountedThreadSafe<OwnerKey> { |
// DeviceSettingsService generates notifications for key and policy update |
// events so interested parties can reload state as appropriate. |
class DeviceSettingsService : public SessionManagerClient::Observer, |
- public TPMTokenLoader::Observer { |
+ public TPMTokenLoader::Observer, |
+ public content::NotificationObserver { |
public: |
// Indicates ownership status of the device. |
enum OwnershipStatus { |
@@ -214,6 +217,11 @@ class DeviceSettingsService : public SessionManagerClient::Observer, |
// TPMTokenLoader::Observer: |
virtual void OnTPMTokenReady() OVERRIDE; |
+ // content::NotificationObserver implementation. |
+ virtual void Observe(int type, |
+ const content::NotificationSource& source, |
+ const content::NotificationDetails& details) OVERRIDE; |
+ |
private: |
// Enqueues a new operation. Takes ownership of |operation| and starts it |
// right away if there is no active operation currently. |
@@ -280,6 +288,8 @@ class DeviceSettingsService : public SessionManagerClient::Observer, |
// For recoverable load errors how many retries are left before we give up. |
int load_retries_left_; |
+ content::NotificationRegistrar registrar_; |
+ |
base::WeakPtrFactory<DeviceSettingsService> weak_factory_; |
DISALLOW_COPY_AND_ASSIGN(DeviceSettingsService); |