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

Unified Diff: chrome/browser/policy/schema_registry_service.h

Issue 349643002: Decoupled the SchemaRegistryService from SchemaRegistry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/schema_registry_service.h
diff --git a/chrome/browser/policy/schema_registry_service.h b/chrome/browser/policy/schema_registry_service.h
index ecf97d794cd1dcb20eccc733c5979fd48d016682..24beefcb3b45e24372be8acad394f9257ddb4467 100644
--- a/chrome/browser/policy/schema_registry_service.h
+++ b/chrome/browser/policy/schema_registry_service.h
@@ -6,30 +6,30 @@
#define CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_H_
#include "base/basictypes.h"
-#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
#include "components/keyed_service/core/keyed_service.h"
-#include "components/policy/core/common/schema_registry.h"
namespace policy {
+class CombinedSchemaRegistry;
class Schema;
+class SchemaRegistry;
-// A SchemaRegistry that is also a KeyedService, and is associated
-// with a Profile.
-class SchemaRegistryService : public SchemaRegistry, public KeyedService {
+// A KeyedService associated with a Profile that contains a SchemaRegistry.
+class SchemaRegistryService : public KeyedService {
public:
- // This SchemaRegistry will initially contain only the |chrome_schema|, if
+ // This |registry| will initially contain only the |chrome_schema|, if
// it's valid. The optional |global_registry| must outlive this, and will
- // track this registry.
- SchemaRegistryService(const Schema& chrome_schema,
+ // track |registry|.
+ SchemaRegistryService(scoped_ptr<SchemaRegistry> registry,
+ const Schema& chrome_schema,
CombinedSchemaRegistry* global_registry);
virtual ~SchemaRegistryService();
- // KeyedService:
- virtual void Shutdown() OVERRIDE;
+ SchemaRegistry* registry() const { return registry_.get(); }
private:
- CombinedSchemaRegistry* global_registry_;
+ scoped_ptr<SchemaRegistry> registry_;
DISALLOW_COPY_AND_ASSIGN(SchemaRegistryService);
};
« no previous file with comments | « chrome/browser/policy/profile_policy_connector_factory.cc ('k') | chrome/browser/policy/schema_registry_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698