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

Side by Side Diff: chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc

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 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 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" 5 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/sequenced_task_runner.h" 10 #include "base/sequenced_task_runner.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 context->GetPath().Append(kPolicy).Append(kComponentsDir); 153 context->GetPath().Append(kPolicy).Append(kComponentsDir);
154 154
155 scoped_ptr<UserCloudPolicyManager> manager; 155 scoped_ptr<UserCloudPolicyManager> manager;
156 manager.reset(new UserCloudPolicyManager( 156 manager.reset(new UserCloudPolicyManager(
157 store.Pass(), 157 store.Pass(),
158 component_policy_cache_dir, 158 component_policy_cache_dir,
159 scoped_ptr<CloudExternalDataManager>(), 159 scoped_ptr<CloudExternalDataManager>(),
160 base::MessageLoopProxy::current(), 160 base::MessageLoopProxy::current(),
161 file_task_runner, 161 file_task_runner,
162 io_task_runner)); 162 io_task_runner));
163 manager->Init(SchemaRegistryServiceFactory::GetForContext(context)); 163 manager->Init(
164 SchemaRegistryServiceFactory::GetForContext(context)->registry());
164 manager_wrappers_[context] = new ManagerWrapper(manager.get()); 165 manager_wrappers_[context] = new ManagerWrapper(manager.get());
165 return manager.Pass(); 166 return manager.Pass();
166 } 167 }
167 168
168 UserCloudPolicyManager* 169 UserCloudPolicyManager*
169 UserCloudPolicyManagerFactory::RegisterManagerForOffTheRecordBrowserContext( 170 UserCloudPolicyManagerFactory::RegisterManagerForOffTheRecordBrowserContext(
170 content::BrowserContext* original_context, 171 content::BrowserContext* original_context,
171 content::BrowserContext* off_the_record_context) { 172 content::BrowserContext* off_the_record_context) {
172 // Register the UserCloudPolicyManager of the original context for the 173 // Register the UserCloudPolicyManager of the original context for the
173 // respective incognito context. See also GetManagerForBrowserContext. 174 // respective incognito context. See also GetManagerForBrowserContext.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 return testing_factory_ != NULL; 207 return testing_factory_ != NULL;
207 } 208 }
208 209
209 void UserCloudPolicyManagerFactory::CreateServiceNow( 210 void UserCloudPolicyManagerFactory::CreateServiceNow(
210 content::BrowserContext* context) { 211 content::BrowserContext* context) {
211 DCHECK(testing_factory_); 212 DCHECK(testing_factory_);
212 manager_wrappers_[context] = new ManagerWrapper(testing_factory_(context)); 213 manager_wrappers_[context] = new ManagerWrapper(testing_factory_(context));
213 } 214 }
214 215
215 } // namespace policy 216 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/storage/settings_apitest.cc ('k') | chrome/browser/policy/profile_policy_connector_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698