OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_READER_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_READER_H_ |
6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_READER_H_ | 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_READER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 protected: | 34 protected: |
35 virtual ~Observer() {} | 35 virtual ~Observer() {} |
36 }; | 36 }; |
37 | 37 |
38 ConfigurationPolicyReader(ConfigurationPolicyProvider* provider, | 38 ConfigurationPolicyReader(ConfigurationPolicyProvider* provider, |
39 PolicyStatusInfo::PolicyLevel policy_level); | 39 PolicyStatusInfo::PolicyLevel policy_level); |
40 virtual ~ConfigurationPolicyReader(); | 40 virtual ~ConfigurationPolicyReader(); |
41 | 41 |
42 // ConfigurationPolicyProvider::Observer methods: | 42 // ConfigurationPolicyProvider::Observer methods: |
43 virtual void OnUpdatePolicy() OVERRIDE; | 43 virtual void OnUpdatePolicy(ConfigurationPolicyProvider* provider) OVERRIDE; |
44 virtual void OnProviderGoingAway() OVERRIDE; | 44 virtual void OnProviderGoingAway( |
| 45 ConfigurationPolicyProvider* provider) OVERRIDE; |
45 | 46 |
46 // Methods to handle Observers. |observer| must be non-NULL. | 47 // Methods to handle Observers. |observer| must be non-NULL. |
47 void AddObserver(Observer* observer); | 48 void AddObserver(Observer* observer); |
48 void RemoveObserver(Observer* observer); | 49 void RemoveObserver(Observer* observer); |
49 | 50 |
50 // Creates a ConfigurationPolicyReader that reads managed platform policy. | 51 // Creates a ConfigurationPolicyReader that reads managed platform policy. |
51 static ConfigurationPolicyReader* CreateManagedPlatformPolicyReader(); | 52 static ConfigurationPolicyReader* CreateManagedPlatformPolicyReader(); |
52 | 53 |
53 // Creates a ConfigurationPolicyReader that reads managed cloud policy. | 54 // Creates a ConfigurationPolicyReader that reads managed cloud policy. |
54 static ConfigurationPolicyReader* CreateManagedCloudPolicyReader(); | 55 static ConfigurationPolicyReader* CreateManagedCloudPolicyReader(); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 scoped_ptr<ConfigurationPolicyReader> managed_cloud_; | 128 scoped_ptr<ConfigurationPolicyReader> managed_cloud_; |
128 scoped_ptr<ConfigurationPolicyReader> recommended_platform_; | 129 scoped_ptr<ConfigurationPolicyReader> recommended_platform_; |
129 scoped_ptr<ConfigurationPolicyReader> recommended_cloud_; | 130 scoped_ptr<ConfigurationPolicyReader> recommended_cloud_; |
130 | 131 |
131 DISALLOW_COPY_AND_ASSIGN(PolicyStatus); | 132 DISALLOW_COPY_AND_ASSIGN(PolicyStatus); |
132 }; | 133 }; |
133 | 134 |
134 } // namespace policy | 135 } // namespace policy |
135 | 136 |
136 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_READER_H_ | 137 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_READER_H_ |
OLD | NEW |