| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromeos/policy/browser_policy_connector_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // schema registry. Eventually it will have its own registry, once device | 149 // schema registry. Eventually it will have its own registry, once device |
| 150 // cloud policy for extensions is introduced. That means it'd have to be | 150 // cloud policy for extensions is introduced. That means it'd have to be |
| 151 // initialized from here instead of BrowserPolicyConnector::Init(). | 151 // initialized from here instead of BrowserPolicyConnector::Init(). |
| 152 | 152 |
| 153 device_cloud_policy_manager_->Initialize(local_state); | 153 device_cloud_policy_manager_->Initialize(local_state); |
| 154 device_cloud_policy_manager_->AddDeviceCloudPolicyManagerObserver(this); | 154 device_cloud_policy_manager_->AddDeviceCloudPolicyManagerObserver(this); |
| 155 RestartDeviceCloudPolicyInitializer(); | 155 RestartDeviceCloudPolicyInitializer(); |
| 156 } | 156 } |
| 157 | 157 |
| 158 DCHECK(install_attributes_); | 158 DCHECK(install_attributes_); |
| 159 if (install_attributes_->IsCloudManaged()) { | 159 if (!install_attributes_->IsActiveDirectoryManaged()) { |
| 160 device_local_account_policy_service_ = | 160 device_local_account_policy_service_ = |
| 161 base::MakeUnique<DeviceLocalAccountPolicyService>( | 161 base::MakeUnique<DeviceLocalAccountPolicyService>( |
| 162 chromeos::DBusThreadManager::Get()->GetSessionManagerClient(), | 162 chromeos::DBusThreadManager::Get()->GetSessionManagerClient(), |
| 163 chromeos::DeviceSettingsService::Get(), | 163 chromeos::DeviceSettingsService::Get(), |
| 164 chromeos::CrosSettings::Get(), | 164 chromeos::CrosSettings::Get(), |
| 165 affiliated_invalidation_service_provider_.get(), | 165 affiliated_invalidation_service_provider_.get(), |
| 166 GetBackgroundTaskRunner(), GetBackgroundTaskRunner(), | 166 GetBackgroundTaskRunner(), GetBackgroundTaskRunner(), |
| 167 GetBackgroundTaskRunner(), | 167 GetBackgroundTaskRunner(), |
| 168 content::BrowserThread::GetTaskRunnerForThread( | 168 content::BrowserThread::GetTaskRunnerForThread( |
| 169 content::BrowserThread::IO), | 169 content::BrowserThread::IO), |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 device_cloud_policy_manager_->device_store()->policy(); | 362 device_cloud_policy_manager_->device_store()->policy(); |
| 363 if (policy_data) { | 363 if (policy_data) { |
| 364 affiliation_ids.insert(policy_data->device_affiliation_ids().begin(), | 364 affiliation_ids.insert(policy_data->device_affiliation_ids().begin(), |
| 365 policy_data->device_affiliation_ids().end()); | 365 policy_data->device_affiliation_ids().end()); |
| 366 } | 366 } |
| 367 } | 367 } |
| 368 return affiliation_ids; | 368 return affiliation_ids; |
| 369 } | 369 } |
| 370 | 370 |
| 371 } // namespace policy | 371 } // namespace policy |
| OLD | NEW |