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

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

Issue 70863002: Refactored the ComponentCloudPolicyService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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_CONFIGURATION_POLICY_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_H_
6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_H_ 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // SchemaRegistry::Observer: 71 // SchemaRegistry::Observer:
72 virtual void OnSchemaRegistryUpdated(bool has_new_schemas) OVERRIDE; 72 virtual void OnSchemaRegistryUpdated(bool has_new_schemas) OVERRIDE;
73 virtual void OnSchemaRegistryReady() OVERRIDE; 73 virtual void OnSchemaRegistryReady() OVERRIDE;
74 74
75 protected: 75 protected:
76 // Subclasses must invoke this to update the policies currently served by 76 // Subclasses must invoke this to update the policies currently served by
77 // this provider. UpdatePolicy() takes ownership of |policies|. 77 // this provider. UpdatePolicy() takes ownership of |policies|.
78 // The observers are notified after the policies are updated. 78 // The observers are notified after the policies are updated.
79 void UpdatePolicy(scoped_ptr<PolicyBundle> bundle); 79 void UpdatePolicy(scoped_ptr<PolicyBundle> bundle);
80 80
81 SchemaRegistry* schema_registry() const;
82
81 const scoped_refptr<SchemaMap>& schema_map() const; 83 const scoped_refptr<SchemaMap>& schema_map() const;
82 84
83 private: 85 private:
84 // The policies currently configured at this provider. 86 // The policies currently configured at this provider.
85 PolicyBundle policy_bundle_; 87 PolicyBundle policy_bundle_;
86 88
87 // Whether Shutdown() has been invoked. 89 // Whether Shutdown() has been invoked.
88 bool did_shutdown_; 90 bool did_shutdown_;
89 91
90 SchemaRegistry* schema_registry_; 92 SchemaRegistry* schema_registry_;
91 93
92 ObserverList<Observer, true> observer_list_; 94 ObserverList<Observer, true> observer_list_;
93 95
94 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyProvider); 96 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyProvider);
95 }; 97 };
96 98
97 } // namespace policy 99 } // namespace policy
98 100
99 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_H_ 101 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698