Index: chrome/browser/chromeos/attestation/attestation_policy_observer.h |
diff --git a/chrome/browser/chromeos/attestation/attestation_policy_observer.h b/chrome/browser/chromeos/attestation/attestation_policy_observer.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f36113fbd19ba0818fcb0d69aebd5d04e9233a96 |
--- /dev/null |
+++ b/chrome/browser/chromeos/attestation/attestation_policy_observer.h |
@@ -0,0 +1,49 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_CHROMEOS_ATTESTATION_ATTESTATION_POLICY_OBSERVER_H_ |
+#define CHROME_BROWSER_CHROMEOS_ATTESTATION_ATTESTATION_POLICY_OBSERVER_H_ |
+ |
+#include "base/basictypes.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "chrome/browser/chromeos/settings/cros_settings.h" |
+#include "chromeos/attestation/attestation_flow.h" |
+#include "content/public/browser/notification_observer.h" |
+ |
+namespace policy { |
+class CloudPolicyManager; |
+} |
+ |
+namespace chromeos { |
+namespace attestation { |
+ |
+// A class which observes policy changes and triggers device attestation work if |
+// necessary. |
+class AttestationPolicyObserver : public content::NotificationObserver { |
+ public: |
+ // This class does not take ownership of |settings| or |policy_manager|. It |
+ // does take ownership of |attestation_flow|. |
+ AttestationPolicyObserver( |
+ CrosSettings* settings, |
+ policy::CloudPolicyManager* policy_manager, |
+ scoped_ptr<AttestationFlow> attestation_flow); |
+ virtual ~AttestationPolicyObserver(); |
+ |
+ // content::NotificationObserver: |
+ virtual void Observe(int type, |
+ const content::NotificationSource& source, |
+ const content::NotificationDetails& details); |
+ |
+ private: |
+ CrosSettings* settings_; |
+ policy::CloudPolicyManager* policy_manager_; |
+ scoped_ptr<AttestationFlow> attestation_flow_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(AttestationPolicyObserver); |
+}; |
+ |
+} // namespace attestation |
+} // namespace chromeos |
+ |
+#endif // CHROME_BROWSER_CHROMEOS_ATTESTATION_ATTESTATION_POLICY_OBSERVER_H_ |