Index: chrome/browser/policy/schema_registry_service_factory.cc |
diff --git a/chrome/browser/policy/schema_registry_service_factory.cc b/chrome/browser/policy/schema_registry_service_factory.cc |
index 71758ffc9076cbb1247912cd29ca8f1166599b20..eaa526848015ce7c60056e06a8583ffa2acc077e 100644 |
--- a/chrome/browser/policy/schema_registry_service_factory.cc |
+++ b/chrome/browser/policy/schema_registry_service_factory.cc |
@@ -60,10 +60,11 @@ SchemaRegistryServiceFactory::CreateForContextInternal( |
CombinedSchemaRegistry* global_registry) { |
DCHECK(!context->IsOffTheRecord()); |
DCHECK(registries_.find(context) == registries_.end()); |
- SchemaRegistryService* registry = |
- new SchemaRegistryService(chrome_schema, global_registry); |
- registries_[context] = registry; |
- return make_scoped_ptr(registry); |
+ scoped_ptr<SchemaRegistry> registry(new SchemaRegistry); |
+ scoped_ptr<SchemaRegistryService> service(new SchemaRegistryService( |
+ registry.Pass(), chrome_schema, global_registry)); |
+ registries_[context] = service.get(); |
+ return service.Pass(); |
} |
void SchemaRegistryServiceFactory::BrowserContextShutdown( |