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

Side by Side Diff: chrome/browser/policy/profile_policy_connector_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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/profile_policy_connector_factory.h" 5 #include "chrome/browser/policy/profile_policy_connector_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "chrome/browser/policy/profile_policy_connector.h" 9 #include "chrome/browser/policy/profile_policy_connector.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 scoped_ptr<ProfilePolicyConnector> 84 scoped_ptr<ProfilePolicyConnector>
85 ProfilePolicyConnectorFactory::CreateForProfileInternal( 85 ProfilePolicyConnectorFactory::CreateForProfileInternal(
86 Profile* profile, 86 Profile* profile,
87 bool force_immediate_load) { 87 bool force_immediate_load) {
88 DCHECK(connectors_.find(profile) == connectors_.end()); 88 DCHECK(connectors_.find(profile) == connectors_.end());
89 89
90 SchemaRegistry* schema_registry = NULL; 90 SchemaRegistry* schema_registry = NULL;
91 CloudPolicyManager* user_cloud_policy_manager = NULL; 91 CloudPolicyManager* user_cloud_policy_manager = NULL;
92 92
93 #if defined(ENABLE_CONFIGURATION_POLICY) 93 #if defined(ENABLE_CONFIGURATION_POLICY)
94 schema_registry = SchemaRegistryServiceFactory::GetForContext(profile); 94 schema_registry =
95 SchemaRegistryServiceFactory::GetForContext(profile)->registry();
95 96
96 #if defined(OS_CHROMEOS) 97 #if defined(OS_CHROMEOS)
97 chromeos::User* user = NULL; 98 chromeos::User* user = NULL;
98 if (!chromeos::ProfileHelper::IsSigninProfile(profile)) { 99 if (!chromeos::ProfileHelper::IsSigninProfile(profile)) {
99 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); 100 chromeos::UserManager* user_manager = chromeos::UserManager::Get();
100 user = user_manager->GetUserByProfile(profile); 101 user = user_manager->GetUserByProfile(profile);
101 CHECK(user); 102 CHECK(user);
102 } 103 }
103 user_cloud_policy_manager = 104 user_cloud_policy_manager =
104 UserCloudPolicyManagerFactoryChromeOS::GetForProfile(profile); 105 UserCloudPolicyManagerFactoryChromeOS::GetForProfile(profile);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 BrowserContextKeyedBaseFactory::BrowserContextDestroyed(context); 138 BrowserContextKeyedBaseFactory::BrowserContextDestroyed(context);
138 } 139 }
139 140
140 void ProfilePolicyConnectorFactory::SetEmptyTestingFactory( 141 void ProfilePolicyConnectorFactory::SetEmptyTestingFactory(
141 content::BrowserContext* context) {} 142 content::BrowserContext* context) {}
142 143
143 void ProfilePolicyConnectorFactory::CreateServiceNow( 144 void ProfilePolicyConnectorFactory::CreateServiceNow(
144 content::BrowserContext* context) {} 145 content::BrowserContext* context) {}
145 146
146 } // namespace policy 147 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc ('k') | chrome/browser/policy/schema_registry_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698