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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 chromeos::User* user = NULL; | 90 chromeos::User* user = NULL; |
91 if (!chromeos::ProfileHelper::IsSigninProfile(profile)) { | 91 if (!chromeos::ProfileHelper::IsSigninProfile(profile)) { |
92 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); | 92 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); |
93 user = user_manager->GetUserByProfile(profile); | 93 user = user_manager->GetUserByProfile(profile); |
94 CHECK(user); | 94 CHECK(user); |
95 } | 95 } |
96 CloudPolicyManager* user_cloud_policy_manager = | 96 CloudPolicyManager* user_cloud_policy_manager = |
97 UserCloudPolicyManagerFactoryChromeOS::GetForProfile(profile); | 97 UserCloudPolicyManagerFactoryChromeOS::GetForProfile(profile); |
98 #else | 98 #else |
99 CloudPolicyManager* user_cloud_policy_manager = | 99 CloudPolicyManager* user_cloud_policy_manager = |
100 UserCloudPolicyManagerFactory::GetForProfile(profile); | 100 UserCloudPolicyManagerFactory::GetForBrowserContext(profile); |
101 #endif | 101 #endif |
102 #else | 102 #else |
103 CloudPolicyManager* user_cloud_policy_manager = NULL; | 103 CloudPolicyManager* user_cloud_policy_manager = NULL; |
104 #endif | 104 #endif |
105 ProfilePolicyConnector* connector = new ProfilePolicyConnector(profile); | 105 ProfilePolicyConnector* connector = new ProfilePolicyConnector(profile); |
106 connector->Init(force_immediate_load, | 106 connector->Init(force_immediate_load, |
107 #if defined(ENABLE_CONFIGURATION_POLICY) && defined(OS_CHROMEOS) | 107 #if defined(ENABLE_CONFIGURATION_POLICY) && defined(OS_CHROMEOS) |
108 user, | 108 user, |
109 #endif | 109 #endif |
110 user_cloud_policy_manager); | 110 user_cloud_policy_manager); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 #endif | 145 #endif |
146 } | 146 } |
147 | 147 |
148 void ProfilePolicyConnectorFactory::SetEmptyTestingFactory( | 148 void ProfilePolicyConnectorFactory::SetEmptyTestingFactory( |
149 content::BrowserContext* context) {} | 149 content::BrowserContext* context) {} |
150 | 150 |
151 void ProfilePolicyConnectorFactory::CreateServiceNow( | 151 void ProfilePolicyConnectorFactory::CreateServiceNow( |
152 content::BrowserContext* context) {} | 152 content::BrowserContext* context) {} |
153 | 153 |
154 } // namespace policy | 154 } // namespace policy |
OLD | NEW |