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

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

Issue 10386097: Refactored ConfigurationPolicyProvider to provide PolicyBundles instead of PolicyMaps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 8 years, 7 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_H_ 5 #ifndef CHROME_BROWSER_POLICY_POLICY_SERVICE_H_
6 #define CHROME_BROWSER_POLICY_POLICY_SERVICE_H_ 6 #define CHROME_BROWSER_POLICY_POLICY_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 virtual ~PolicyService() {} 56 virtual ~PolicyService() {}
57 57
58 virtual void AddObserver(PolicyDomain domain, 58 virtual void AddObserver(PolicyDomain domain,
59 const std::string& component_id, 59 const std::string& component_id,
60 Observer* observer) = 0; 60 Observer* observer) = 0;
61 61
62 virtual void RemoveObserver(PolicyDomain domain, 62 virtual void RemoveObserver(PolicyDomain domain,
63 const std::string& component_id, 63 const std::string& component_id,
64 Observer* observer) = 0; 64 Observer* observer) = 0;
65 65
66 // Returns NULL if no policies are available for |domain|, | component_id|. 66 virtual const PolicyMap& GetPolicies(
67 virtual const PolicyMap* GetPolicies(
68 PolicyDomain domain, 67 PolicyDomain domain,
69 const std::string& component_id) const = 0; 68 const std::string& component_id) const = 0;
70 69
71 // The PolicyService loads policy from several sources, and some require 70 // The PolicyService loads policy from several sources, and some require
72 // asynchronous loads. IsInitializationComplete() returns true once all 71 // asynchronous loads. IsInitializationComplete() returns true once all
73 // sources have loaded their policies. It is safe to read policy from the 72 // sources have loaded their policies. It is safe to read policy from the
74 // PolicyService even if IsInitializationComplete() is false; there will be an 73 // PolicyService even if IsInitializationComplete() is false; there will be an
75 // OnPolicyUpdated() notification once new policies become available. 74 // OnPolicyUpdated() notification once new policies become available.
76 // 75 //
77 // OnPolicyServiceInitialized() is called when IsInitializationComplete() 76 // OnPolicyServiceInitialized() is called when IsInitializationComplete()
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 PolicyDomain domain_; 120 PolicyDomain domain_;
122 std::string component_id_; 121 std::string component_id_;
123 CallbackMap callback_map_; 122 CallbackMap callback_map_;
124 123
125 DISALLOW_COPY_AND_ASSIGN(PolicyChangeRegistrar); 124 DISALLOW_COPY_AND_ASSIGN(PolicyChangeRegistrar);
126 }; 125 };
127 126
128 } // namespace policy 127 } // namespace policy
129 128
130 #endif // CHROME_BROWSER_POLICY_POLICY_SERVICE_H_ 129 #endif // CHROME_BROWSER_POLICY_POLICY_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/network_configuration_updater_unittest.cc ('k') | chrome/browser/policy/policy_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698