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

Side by Side Diff: chrome/browser/policy/policy_service_stub.h

Issue 16254003: WIP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_bundle.h"
9 #include "chrome/browser/policy/policy_map.h" 10 #include "chrome/browser/policy/policy_map.h"
10 #include "chrome/browser/policy/policy_service.h" 11 #include "chrome/browser/policy/policy_service.h"
11 12
12 namespace policy { 13 namespace policy {
13 14
14 // A stub implementation, that is used when ENABLE_CONFIGURATION_POLICY is not 15 // A stub implementation, that is used when ENABLE_CONFIGURATION_POLICY is not
15 // set. This allows client code to compile without requiring #ifdefs. 16 // set. This allows client code to compile without requiring #ifdefs.
16 class PolicyServiceStub : public PolicyService { 17 class PolicyServiceStub : public PolicyService {
17 public: 18 public:
18 PolicyServiceStub(); 19 PolicyServiceStub();
19 virtual ~PolicyServiceStub(); 20 virtual ~PolicyServiceStub();
20 21
21 virtual void AddObserver(PolicyDomain domain, 22 virtual void AddObserver(PolicyDomain domain,
22 Observer* observer) OVERRIDE; 23 Observer* observer) OVERRIDE;
23 24
24 virtual void RemoveObserver(PolicyDomain domain, 25 virtual void RemoveObserver(PolicyDomain domain,
25 Observer* observer) OVERRIDE; 26 Observer* observer) OVERRIDE;
26 27
27 virtual void RegisterPolicyDomain( 28 virtual void RegisterPolicyDomain(
28 PolicyDomain domain, 29 PolicyDomain domain,
29 const std::set<std::string>& components) OVERRIDE; 30 const std::set<std::string>& components) OVERRIDE;
30 31
31 virtual const PolicyMap& GetPolicies( 32 virtual const PolicyMap& GetPolicies(
32 const PolicyNamespace& ns) const OVERRIDE; 33 const PolicyNamespace& ns) const OVERRIDE;
33 34
35 virtual const PolicyBundle& GetAllPolicies() const OVERRIDE;
36
34 virtual bool IsInitializationComplete(PolicyDomain domain) const OVERRIDE; 37 virtual bool IsInitializationComplete(PolicyDomain domain) const OVERRIDE;
35 38
36 virtual void RefreshPolicies(const base::Closure& callback) OVERRIDE; 39 virtual void RefreshPolicies(const base::Closure& callback) OVERRIDE;
37 private: 40 private:
38 const PolicyMap kEmpty_; 41 const PolicyMap kEmptyMap_;
42 const PolicyBundle kEmptyBundle_;
39 43
40 DISALLOW_COPY_AND_ASSIGN(PolicyServiceStub); 44 DISALLOW_COPY_AND_ASSIGN(PolicyServiceStub);
41 }; 45 };
42 46
43 } // namespace policy 47 } // namespace policy
44 48
45 #endif // CHROME_BROWSER_POLICY_POLICY_SERVICE_STUB_H_ 49 #endif // CHROME_BROWSER_POLICY_POLICY_SERVICE_STUB_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_service_impl.cc ('k') | chrome/browser/policy/policy_service_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698