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_STUB_H_ | 5 #ifndef CHROME_BROWSER_POLICY_POLICY_SERVICE_STUB_H_ |
6 #define CHROME_BROWSER_POLICY_POLICY_SERVICE_STUB_H_ | 6 #define CHROME_BROWSER_POLICY_POLICY_SERVICE_STUB_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "chrome/browser/policy/policy_map.h" | 9 #include "chrome/browser/policy/policy_map.h" |
10 #include "chrome/browser/policy/policy_service.h" | 10 #include "chrome/browser/policy/policy_service.h" |
11 | 11 |
12 namespace policy { | 12 namespace policy { |
13 | 13 |
14 // A stub implementation, that is used when ENABLE_CONFIGURATION_POLICY is not | 14 // A stub implementation, that is used when ENABLE_CONFIGURATION_POLICY is not |
15 // set. This allows client code to compile without requiring #ifdefs. | 15 // set. This allows client code to compile without requiring #ifdefs. |
16 class PolicyServiceStub : public PolicyService { | 16 class PolicyServiceStub : public PolicyService { |
17 public: | 17 public: |
18 PolicyServiceStub(); | 18 PolicyServiceStub(); |
19 virtual ~PolicyServiceStub(); | 19 virtual ~PolicyServiceStub(); |
20 | 20 |
21 virtual void AddObserver(PolicyDomain domain, | 21 virtual void AddObserver(PolicyDomain domain, |
22 Observer* observer) OVERRIDE; | 22 Observer* observer) OVERRIDE; |
23 | 23 |
24 virtual void RemoveObserver(PolicyDomain domain, | 24 virtual void RemoveObserver(PolicyDomain domain, |
25 Observer* observer) OVERRIDE; | 25 Observer* observer) OVERRIDE; |
26 | 26 |
27 virtual void RegisterPolicyDomain( | |
28 scoped_refptr<const PolicyDomainDescriptor> descriptor) OVERRIDE; | |
29 | |
30 virtual const PolicyMap& GetPolicies( | 27 virtual const PolicyMap& GetPolicies( |
31 const PolicyNamespace& ns) const OVERRIDE; | 28 const PolicyNamespace& ns) const OVERRIDE; |
32 | 29 |
33 virtual scoped_refptr<const PolicyDomainDescriptor> GetPolicyDomainDescriptor( | |
34 PolicyDomain domain) const OVERRIDE; | |
35 | |
36 virtual bool IsInitializationComplete(PolicyDomain domain) const OVERRIDE; | 30 virtual bool IsInitializationComplete(PolicyDomain domain) const OVERRIDE; |
37 | 31 |
38 virtual void RefreshPolicies(const base::Closure& callback) OVERRIDE; | 32 virtual void RefreshPolicies(const base::Closure& callback) OVERRIDE; |
39 private: | 33 private: |
40 const PolicyMap kEmpty_; | 34 const PolicyMap kEmpty_; |
41 | 35 |
42 DISALLOW_COPY_AND_ASSIGN(PolicyServiceStub); | 36 DISALLOW_COPY_AND_ASSIGN(PolicyServiceStub); |
43 }; | 37 }; |
44 | 38 |
45 } // namespace policy | 39 } // namespace policy |
46 | 40 |
47 #endif // CHROME_BROWSER_POLICY_POLICY_SERVICE_STUB_H_ | 41 #endif // CHROME_BROWSER_POLICY_POLICY_SERVICE_STUB_H_ |
OLD | NEW |