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

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

Issue 22493010: policy: load JSON schema into domain descriptor at start time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments and clean up includes Created 7 years, 3 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
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_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 22 matching lines...) Expand all
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 scoped_refptr<const PolicyDomainDescriptor> descriptor) OVERRIDE; 42 scoped_refptr<const PolicyDomainDescriptor> descriptor) OVERRIDE;
43 virtual void InitialRegisterPolicyDomain(
44 scoped_refptr<const PolicyDomainDescriptor> descriptor) OVERRIDE;
43 virtual const PolicyMap& GetPolicies( 45 virtual const PolicyMap& GetPolicies(
44 const PolicyNamespace& ns) const OVERRIDE; 46 const PolicyNamespace& ns) const OVERRIDE;
45 virtual scoped_refptr<const PolicyDomainDescriptor> GetPolicyDomainDescriptor( 47 virtual scoped_refptr<const PolicyDomainDescriptor> GetPolicyDomainDescriptor(
46 PolicyDomain domain) const OVERRIDE; 48 PolicyDomain domain) const OVERRIDE;
47 virtual bool IsInitializationComplete(PolicyDomain domain) const OVERRIDE; 49 virtual bool IsInitializationComplete(PolicyDomain domain) const OVERRIDE;
48 virtual void RefreshPolicies(const base::Closure& callback) OVERRIDE; 50 virtual void RefreshPolicies(const base::Closure& callback) OVERRIDE;
49 51
50 private: 52 private:
51 typedef ObserverList<PolicyService::Observer, true> Observers; 53 typedef ObserverList<PolicyService::Observer, true> Observers;
52 typedef std::map<PolicyDomain, Observers*> ObserverMap; 54 typedef std::map<PolicyDomain, Observers*> ObserverMap;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // Used to create tasks to delay new policy updates while we may be already 100 // Used to create tasks to delay new policy updates while we may be already
99 // processing previous policy updates. 101 // processing previous policy updates.
100 base::WeakPtrFactory<PolicyServiceImpl> update_task_ptr_factory_; 102 base::WeakPtrFactory<PolicyServiceImpl> update_task_ptr_factory_;
101 103
102 DISALLOW_COPY_AND_ASSIGN(PolicyServiceImpl); 104 DISALLOW_COPY_AND_ASSIGN(PolicyServiceImpl);
103 }; 105 };
104 106
105 } // namespace policy 107 } // namespace policy
106 108
107 #endif // CHROME_BROWSER_POLICY_POLICY_SERVICE_IMPL_H_ 109 #endif // CHROME_BROWSER_POLICY_POLICY_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698