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

Side by Side Diff: chrome/browser/policy/schema_registry_service_factory.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "chrome/browser/policy/schema_registry_service_factory.h" 5 #include "chrome/browser/policy/schema_registry_service_factory.h"
6 6
7 #include <utility>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "build/build_config.h" 10 #include "build/build_config.h"
9 #include "chrome/browser/policy/schema_registry_service.h" 11 #include "chrome/browser/policy/schema_registry_service.h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h" 12 #include "components/keyed_service/content/browser_context_dependency_manager.h"
11 #include "components/policy/core/common/schema.h" 13 #include "components/policy/core/common/schema.h"
12 #include "components/policy/core/common/schema_registry.h" 14 #include "components/policy/core/common/schema_registry.h"
13 #include "content/public/browser/browser_context.h" 15 #include "content/public/browser/browser_context.h"
14 16
15 #if defined(OS_CHROMEOS) 17 #if defined(OS_CHROMEOS)
16 #include "chrome/browser/browser_process.h" 18 #include "chrome/browser/browser_process.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // cache policy even if there is no active session for that account. 117 // cache policy even if there is no active session for that account.
116 // Use a ForwardingSchemaRegistry that wraps this SchemaRegistry. 118 // Use a ForwardingSchemaRegistry that wraps this SchemaRegistry.
117 registry.reset(new ForwardingSchemaRegistry(broker->schema_registry())); 119 registry.reset(new ForwardingSchemaRegistry(broker->schema_registry()));
118 } 120 }
119 #endif 121 #endif
120 122
121 if (!registry) 123 if (!registry)
122 registry.reset(new SchemaRegistry); 124 registry.reset(new SchemaRegistry);
123 125
124 scoped_ptr<SchemaRegistryService> service(new SchemaRegistryService( 126 scoped_ptr<SchemaRegistryService> service(new SchemaRegistryService(
125 registry.Pass(), chrome_schema, global_registry)); 127 std::move(registry), chrome_schema, global_registry));
126 registries_[context] = service.get(); 128 registries_[context] = service.get();
127 return service.Pass(); 129 return service;
128 } 130 }
129 131
130 void SchemaRegistryServiceFactory::BrowserContextShutdown( 132 void SchemaRegistryServiceFactory::BrowserContextShutdown(
131 content::BrowserContext* context) { 133 content::BrowserContext* context) {
132 if (context->IsOffTheRecord()) 134 if (context->IsOffTheRecord())
133 return; 135 return;
134 RegistryMap::iterator it = registries_.find(context); 136 RegistryMap::iterator it = registries_.find(context);
135 if (it != registries_.end()) 137 if (it != registries_.end())
136 it->second->Shutdown(); 138 it->second->Shutdown();
137 else 139 else
(...skipping 11 matching lines...) Expand all
149 151
150 bool SchemaRegistryServiceFactory::HasTestingFactory( 152 bool SchemaRegistryServiceFactory::HasTestingFactory(
151 content::BrowserContext* context) { 153 content::BrowserContext* context) {
152 return false; 154 return false;
153 } 155 }
154 156
155 void SchemaRegistryServiceFactory::CreateServiceNow( 157 void SchemaRegistryServiceFactory::CreateServiceNow(
156 content::BrowserContext* context) {} 158 content::BrowserContext* context) {}
157 159
158 } // namespace policy 160 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698