OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_POLICY_SERVICE_IMPL_H_ | 5 #ifndef CHROME_BROWSER_POLICY_POLICY_SERVICE_IMPL_H_ |
6 #define CHROME_BROWSER_POLICY_POLICY_SERVICE_IMPL_H_ | 6 #define CHROME_BROWSER_POLICY_POLICY_SERVICE_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 21 matching lines...) Expand all Loading... |
32 // the providers, and they must outlive the PolicyServiceImpl. | 32 // the providers, and they must outlive the PolicyServiceImpl. |
33 explicit PolicyServiceImpl(const Providers& providers); | 33 explicit PolicyServiceImpl(const Providers& providers); |
34 virtual ~PolicyServiceImpl(); | 34 virtual ~PolicyServiceImpl(); |
35 | 35 |
36 // PolicyService overrides: | 36 // PolicyService overrides: |
37 virtual void AddObserver(PolicyDomain domain, | 37 virtual void AddObserver(PolicyDomain domain, |
38 PolicyService::Observer* observer) OVERRIDE; | 38 PolicyService::Observer* observer) OVERRIDE; |
39 virtual void RemoveObserver(PolicyDomain domain, | 39 virtual void RemoveObserver(PolicyDomain domain, |
40 PolicyService::Observer* observer) OVERRIDE; | 40 PolicyService::Observer* observer) OVERRIDE; |
41 virtual void RegisterPolicyDomain( | 41 virtual void RegisterPolicyDomain( |
42 PolicyDomain domain, | 42 scoped_refptr<const PolicyDomainDescriptor> descriptor) OVERRIDE; |
43 const std::set<std::string>& components) OVERRIDE; | |
44 virtual const PolicyMap& GetPolicies( | 43 virtual const PolicyMap& GetPolicies( |
45 const PolicyNamespace& ns) const OVERRIDE; | 44 const PolicyNamespace& ns) const OVERRIDE; |
46 virtual bool IsInitializationComplete(PolicyDomain domain) const OVERRIDE; | 45 virtual bool IsInitializationComplete(PolicyDomain domain) const OVERRIDE; |
47 virtual void RefreshPolicies(const base::Closure& callback) OVERRIDE; | 46 virtual void RefreshPolicies(const base::Closure& callback) OVERRIDE; |
48 | 47 |
49 private: | 48 private: |
50 typedef ObserverList<PolicyService::Observer, true> Observers; | 49 typedef ObserverList<PolicyService::Observer, true> Observers; |
51 typedef std::map<PolicyDomain, Observers*> ObserverMap; | 50 typedef std::map<PolicyDomain, Observers*> ObserverMap; |
52 | 51 |
53 // Information about policy changes sent to observers. | 52 // Information about policy changes sent to observers. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // Used to create tasks to delay new policy updates while we may be already | 110 // Used to create tasks to delay new policy updates while we may be already |
112 // processing previous policy updates. | 111 // processing previous policy updates. |
113 base::WeakPtrFactory<PolicyServiceImpl> weak_ptr_factory_; | 112 base::WeakPtrFactory<PolicyServiceImpl> weak_ptr_factory_; |
114 | 113 |
115 DISALLOW_COPY_AND_ASSIGN(PolicyServiceImpl); | 114 DISALLOW_COPY_AND_ASSIGN(PolicyServiceImpl); |
116 }; | 115 }; |
117 | 116 |
118 } // namespace policy | 117 } // namespace policy |
119 | 118 |
120 #endif // CHROME_BROWSER_POLICY_POLICY_SERVICE_IMPL_H_ | 119 #endif // CHROME_BROWSER_POLICY_POLICY_SERVICE_IMPL_H_ |
OLD | NEW |