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

Unified Diff: chrome/browser/policy/policy_notifier.h

Issue 11946017: Remove old cloud policy code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nits. Created 7 years, 11 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
« no previous file with comments | « chrome/browser/policy/mock_cloud_policy_data_store.cc ('k') | chrome/browser/policy/policy_notifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/policy_notifier.h
diff --git a/chrome/browser/policy/policy_notifier.h b/chrome/browser/policy/policy_notifier.h
deleted file mode 100644
index 12d648b834177cafe8cd0fa720d3e5ae800cbcd3..0000000000000000000000000000000000000000
--- a/chrome/browser/policy/policy_notifier.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2012 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_POLICY_POLICY_NOTIFIER_H_
-#define CHROME_BROWSER_POLICY_POLICY_NOTIFIER_H_
-
-#include "base/observer_list.h"
-#include "chrome/browser/policy/cloud_policy_subsystem.h"
-
-namespace policy {
-
-// Keeps track of the state of the policy subsystem components as far as it's
-// relevant to the outside world. Is informed by components about status
-// changes (failures and successes), determines the overall state and
-// communicates it.
-class PolicyNotifier {
- public:
- typedef CloudPolicySubsystem::PolicySubsystemState PolicySubsystemState;
- typedef CloudPolicySubsystem::ErrorDetails ErrorDetails;
-
- enum StatusSource {
- TOKEN_FETCHER,
- POLICY_CONTROLLER,
- POLICY_CACHE,
- NUM_SOURCES // This must be the last element in the enum.
- };
-
- PolicyNotifier();
- ~PolicyNotifier();
-
- // Called by components of the policy subsystem. Determines the new overall
- // state and triggers observer notifications as necessary.
- void Inform(PolicySubsystemState state,
- ErrorDetails error_details,
- StatusSource source);
-
- CloudPolicySubsystem::PolicySubsystemState state() const {
- return state_;
- }
-
- CloudPolicySubsystem::ErrorDetails error_details() const {
- return error_details_;
- }
-
- private:
- friend class CloudPolicyController;
- friend class CloudPolicySubsystem::ObserverRegistrar;
-
- void AddObserver(CloudPolicySubsystem::Observer* observer);
- void RemoveObserver(CloudPolicySubsystem::Observer* observer);
-
- void RecomputeState();
-
- PolicySubsystemState state_;
- ErrorDetails error_details_;
-
- PolicySubsystemState component_states_[NUM_SOURCES];
- ErrorDetails component_error_details_[NUM_SOURCES];
-
- ObserverList<CloudPolicySubsystem::Observer, true> observer_list_;
-
- DISALLOW_COPY_AND_ASSIGN(PolicyNotifier);
-};
-
-} // namespace policy
-
-#endif // CHROME_BROWSER_POLICY_POLICY_NOTIFIER_H_
« no previous file with comments | « chrome/browser/policy/mock_cloud_policy_data_store.cc ('k') | chrome/browser/policy/policy_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698