Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/device_cloud_policy_manager_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 246 attestation_policy_observer_.reset( | 246 attestation_policy_observer_.reset( |
| 247 new chromeos::attestation::AttestationPolicyObserver(client())); | 247 new chromeos::attestation::AttestationPolicyObserver(client())); |
| 248 | 248 |
| 249 // Enable device reporting and status monitoring for enterprise enrolled | 249 // Enable device reporting and status monitoring for enterprise enrolled |
| 250 // devices. We want to create these objects for enrolled devices, even if | 250 // devices. We want to create these objects for enrolled devices, even if |
| 251 // monitoring is currently inactive, in case monitoring is turned back on in | 251 // monitoring is currently inactive, in case monitoring is turned back on in |
| 252 // a future policy fetch - the classes themselves track the current state of | 252 // a future policy fetch - the classes themselves track the current state of |
| 253 // the monitoring settings and only perform monitoring if it is active. | 253 // the monitoring settings and only perform monitoring if it is active. |
| 254 if (install_attributes->IsEnterpriseDevice()) { | 254 if (install_attributes->IsEnterpriseDevice()) { |
| 255 CreateStatusUploader(); | 255 CreateStatusUploader(); |
| 256 heartbeat_scheduler_.reset( | 256 heartbeat_scheduler_.reset(new HeartbeatScheduler( |
| 257 new HeartbeatScheduler(g_browser_process->gcm_driver(), | 257 g_browser_process->gcm_driver(), core()->client(), |
|
Andrew T Wilson (Slow)
2015/08/03 13:52:26
can you just use client() here and not core()->cli
binjin
2015/08/03 17:54:24
Done.
| |
| 258 install_attributes->GetDomain(), | 258 install_attributes->GetDomain(), install_attributes->GetDeviceId(), |
| 259 install_attributes->GetDeviceId(), | 259 task_runner_)); |
| 260 task_runner_)); | |
| 261 } | 260 } |
| 262 | 261 |
| 263 NotifyConnected(); | 262 NotifyConnected(); |
| 264 } | 263 } |
| 265 | 264 |
| 266 void DeviceCloudPolicyManagerChromeOS::Unregister( | 265 void DeviceCloudPolicyManagerChromeOS::Unregister( |
| 267 const UnregisterCallback& callback) { | 266 const UnregisterCallback& callback) { |
| 268 if (!service()) { | 267 if (!service()) { |
| 269 LOG(ERROR) << "Tried to unregister but DeviceCloudPolicyManagerChromeOS is " | 268 LOG(ERROR) << "Tried to unregister but DeviceCloudPolicyManagerChromeOS is " |
| 270 << "not connected."; | 269 << "not connected."; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 336 make_scoped_ptr(new DeviceStatusCollector( | 335 make_scoped_ptr(new DeviceStatusCollector( |
| 337 local_state_, chromeos::system::StatisticsProvider::GetInstance(), | 336 local_state_, chromeos::system::StatisticsProvider::GetInstance(), |
| 338 DeviceStatusCollector::LocationUpdateRequester(), | 337 DeviceStatusCollector::LocationUpdateRequester(), |
| 339 DeviceStatusCollector::VolumeInfoFetcher(), | 338 DeviceStatusCollector::VolumeInfoFetcher(), |
| 340 DeviceStatusCollector::CPUStatisticsFetcher(), | 339 DeviceStatusCollector::CPUStatisticsFetcher(), |
| 341 DeviceStatusCollector::CPUTempFetcher())), | 340 DeviceStatusCollector::CPUTempFetcher())), |
| 342 task_runner_)); | 341 task_runner_)); |
| 343 } | 342 } |
| 344 | 343 |
| 345 } // namespace policy | 344 } // namespace policy |
| OLD | NEW |