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

Side by Side Diff: components/policy/core/common/policy_service.h

Issue 108603005: Update uses of Value in chromeos/, cloud_print/, components/, content/ to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 COMPONENTS_POLICY_CORE_COMMON_POLICY_SERVICE_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_POLICY_SERVICE_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_POLICY_SERVICE_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_POLICY_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // Asks the PolicyService to reload policy from all available policy sources. 71 // Asks the PolicyService to reload policy from all available policy sources.
72 // |callback| is invoked once every source has reloaded its policies, and 72 // |callback| is invoked once every source has reloaded its policies, and
73 // GetPolicies() is guaranteed to return the updated values at that point. 73 // GetPolicies() is guaranteed to return the updated values at that point.
74 virtual void RefreshPolicies(const base::Closure& callback) = 0; 74 virtual void RefreshPolicies(const base::Closure& callback) = 0;
75 }; 75 };
76 76
77 // A registrar that only observes changes to particular policies within the 77 // A registrar that only observes changes to particular policies within the
78 // PolicyMap for the given policy namespace. 78 // PolicyMap for the given policy namespace.
79 class POLICY_EXPORT PolicyChangeRegistrar : public PolicyService::Observer { 79 class POLICY_EXPORT PolicyChangeRegistrar : public PolicyService::Observer {
80 public: 80 public:
81 typedef base::Callback<void(const Value*, const Value*)> UpdateCallback; 81 typedef base::Callback<void(const base::Value*,
82 const base::Value*)> UpdateCallback;
82 83
83 // Observes updates to the given (domain, component_id) namespace in the given 84 // Observes updates to the given (domain, component_id) namespace in the given
84 // |policy_service|, and notifies |observer| whenever any of the registered 85 // |policy_service|, and notifies |observer| whenever any of the registered
85 // policy keys changes. Both the |policy_service| and the |observer| must 86 // policy keys changes. Both the |policy_service| and the |observer| must
86 // outlive |this|. 87 // outlive |this|.
87 PolicyChangeRegistrar(PolicyService* policy_service, 88 PolicyChangeRegistrar(PolicyService* policy_service,
88 const PolicyNamespace& ns); 89 const PolicyNamespace& ns);
89 90
90 virtual ~PolicyChangeRegistrar(); 91 virtual ~PolicyChangeRegistrar();
91 92
(...skipping 14 matching lines...) Expand all
106 PolicyService* policy_service_; 107 PolicyService* policy_service_;
107 PolicyNamespace ns_; 108 PolicyNamespace ns_;
108 CallbackMap callback_map_; 109 CallbackMap callback_map_;
109 110
110 DISALLOW_COPY_AND_ASSIGN(PolicyChangeRegistrar); 111 DISALLOW_COPY_AND_ASSIGN(PolicyChangeRegistrar);
111 }; 112 };
112 113
113 } // namespace policy 114 } // namespace policy
114 115
115 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_SERVICE_H_ 116 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_SERVICE_H_
OLDNEW
« no previous file with comments | « components/policy/core/common/policy_map_unittest.cc ('k') | components/policy/core/common/policy_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698