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.h" | 5 #include "chrome/browser/policy/profile_policy_connector.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 providers.push_back(user_cloud_policy_manager); | 99 providers.push_back(user_cloud_policy_manager); |
100 | 100 |
101 #if defined(OS_CHROMEOS) | 101 #if defined(OS_CHROMEOS) |
102 if (!user) { | 102 if (!user) { |
103 DCHECK(schema_registry); | 103 DCHECK(schema_registry); |
104 // This case occurs for the signin profile. | 104 // This case occurs for the signin profile. |
105 special_user_policy_provider_.reset( | 105 special_user_policy_provider_.reset( |
106 new LoginProfilePolicyProvider(connector->GetPolicyService())); | 106 new LoginProfilePolicyProvider(connector->GetPolicyService())); |
107 } else { | 107 } else { |
108 // |user| should never be NULL except for the signin profile. | 108 // |user| should never be NULL except for the signin profile. |
109 is_primary_user_ = user == chromeos::UserManager::Get()->GetPrimaryUser(); | 109 is_primary_user_ = user == chromeos::GetUserManager()->GetPrimaryUser(); |
110 special_user_policy_provider_ = DeviceLocalAccountPolicyProvider::Create( | 110 special_user_policy_provider_ = DeviceLocalAccountPolicyProvider::Create( |
111 user->email(), | 111 user->email(), |
112 connector->GetDeviceLocalAccountPolicyService()); | 112 connector->GetDeviceLocalAccountPolicyService()); |
113 } | 113 } |
114 if (special_user_policy_provider_) { | 114 if (special_user_policy_provider_) { |
115 special_user_policy_provider_->Init(schema_registry); | 115 special_user_policy_provider_->Init(schema_registry); |
116 providers.push_back(special_user_policy_provider_.get()); | 116 providers.push_back(special_user_policy_provider_.get()); |
117 } | 117 } |
118 #endif | 118 #endif |
119 | 119 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 BrowserPolicyConnectorChromeOS* connector = | 174 BrowserPolicyConnectorChromeOS* connector = |
175 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 175 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
176 if (HasChromePolicy(connector->GetDeviceCloudPolicyManager(), name)) | 176 if (HasChromePolicy(connector->GetDeviceCloudPolicyManager(), name)) |
177 return false; | 177 return false; |
178 #endif | 178 #endif |
179 | 179 |
180 return true; | 180 return true; |
181 } | 181 } |
182 | 182 |
183 } // namespace policy | 183 } // namespace policy |
OLD | NEW |