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

Unified Diff: chrome/browser/chromeos/attestation/attestation_policy_observer.h

Issue 12556004: Created AttestationPolicyObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/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_

Powered by Google App Engine
This is Rietveld 408576698