| 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 "chrome/browser/policy/profile_policy_connector.h" | 8 #include "chrome/browser/policy/profile_policy_connector.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 chromeos::User* user = NULL; | 87 chromeos::User* user = NULL; |
| 88 if (!profile->IsLoginProfile()) { | 88 if (!profile->IsLoginProfile()) { |
| 89 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); | 89 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); |
| 90 user = user_manager->GetUserByProfile(profile); | 90 user = user_manager->GetUserByProfile(profile); |
| 91 CHECK(user); | 91 CHECK(user); |
| 92 } | 92 } |
| 93 CloudPolicyManager* user_cloud_policy_manager = | 93 CloudPolicyManager* user_cloud_policy_manager = |
| 94 UserCloudPolicyManagerFactoryChromeOS::GetForProfile(profile); | 94 UserCloudPolicyManagerFactoryChromeOS::GetForProfile(profile); |
| 95 #else | 95 #else |
| 96 CloudPolicyManager* user_cloud_policy_manager = | 96 CloudPolicyManager* user_cloud_policy_manager = |
| 97 UserCloudPolicyManagerFactory::GetForProfile(profile); | 97 UserCloudPolicyManagerFactory::GetForBrowserContext(profile); |
| 98 #endif | 98 #endif |
| 99 ProfilePolicyConnector* connector = new ProfilePolicyConnector(); | 99 ProfilePolicyConnector* connector = new ProfilePolicyConnector(); |
| 100 connector->Init(force_immediate_load, | 100 connector->Init(force_immediate_load, |
| 101 #if defined(ENABLE_CONFIGURATION_POLICY) && defined(OS_CHROMEOS) | 101 #if defined(ENABLE_CONFIGURATION_POLICY) && defined(OS_CHROMEOS) |
| 102 user, | 102 user, |
| 103 #endif | 103 #endif |
| 104 user_cloud_policy_manager); | 104 user_cloud_policy_manager); |
| 105 connectors_[profile] = connector; | 105 connectors_[profile] = connector; |
| 106 return make_scoped_ptr(connector); | 106 return make_scoped_ptr(connector); |
| 107 } | 107 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 133 #endif | 133 #endif |
| 134 } | 134 } |
| 135 | 135 |
| 136 void ProfilePolicyConnectorFactory::SetEmptyTestingFactory( | 136 void ProfilePolicyConnectorFactory::SetEmptyTestingFactory( |
| 137 content::BrowserContext* context) {} | 137 content::BrowserContext* context) {} |
| 138 | 138 |
| 139 void ProfilePolicyConnectorFactory::CreateServiceNow( | 139 void ProfilePolicyConnectorFactory::CreateServiceNow( |
| 140 content::BrowserContext* context) {} | 140 content::BrowserContext* context) {} |
| 141 | 141 |
| 142 } // namespace policy | 142 } // namespace policy |
| OLD | NEW |