| 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 "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 new DeviceManagementService(configuration.Pass())); | 147 new DeviceManagementService(configuration.Pass())); |
| 148 consumer_device_management_service_->ScheduleInitialization( | 148 consumer_device_management_service_->ScheduleInitialization( |
| 149 kServiceInitializationStartupDelay); | 149 kServiceInitializationStartupDelay); |
| 150 | 150 |
| 151 if (device_cloud_policy_manager_) { | 151 if (device_cloud_policy_manager_) { |
| 152 // Note: for now the |device_cloud_policy_manager_| is using the global | 152 // Note: for now the |device_cloud_policy_manager_| is using the global |
| 153 // schema registry. Eventually it will have its own registry, once device | 153 // schema registry. Eventually it will have its own registry, once device |
| 154 // cloud policy for extensions is introduced. That means it'd have to be | 154 // cloud policy for extensions is introduced. That means it'd have to be |
| 155 // initialized from here instead of BrowserPolicyConnector::Init(). | 155 // initialized from here instead of BrowserPolicyConnector::Init(). |
| 156 | 156 |
| 157 device_cloud_policy_manager_->Initialize(local_state); | |
| 158 | |
| 159 device_cloud_policy_initializer_.reset( | 157 device_cloud_policy_initializer_.reset( |
| 160 new DeviceCloudPolicyInitializer( | 158 new DeviceCloudPolicyInitializer( |
| 161 local_state, | 159 local_state, |
| 162 device_management_service(), | 160 device_management_service(), |
| 163 consumer_device_management_service(), | 161 consumer_device_management_service(), |
| 164 GetBackgroundTaskRunner(), | 162 GetBackgroundTaskRunner(), |
| 165 install_attributes_.get(), | 163 install_attributes_.get(), |
| 166 state_keys_broker_.get(), | 164 state_keys_broker_.get(), |
| 167 device_cloud_policy_manager_->device_store(), | 165 device_cloud_policy_manager_->device_store(), |
| 168 device_cloud_policy_manager_, | 166 device_cloud_policy_manager_, |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 // This function is invoked by DCPInitializer, so we should release the | 308 // This function is invoked by DCPInitializer, so we should release the |
| 311 // initializer after this function returns. | 309 // initializer after this function returns. |
| 312 if (device_cloud_policy_initializer_) { | 310 if (device_cloud_policy_initializer_) { |
| 313 device_cloud_policy_initializer_->Shutdown(); | 311 device_cloud_policy_initializer_->Shutdown(); |
| 314 base::MessageLoop::current()->DeleteSoon( | 312 base::MessageLoop::current()->DeleteSoon( |
| 315 FROM_HERE, device_cloud_policy_initializer_.release()); | 313 FROM_HERE, device_cloud_policy_initializer_.release()); |
| 316 } | 314 } |
| 317 } | 315 } |
| 318 | 316 |
| 319 } // namespace policy | 317 } // namespace policy |
| OLD | NEW |