| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |