| 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_status_collector.h" | 5 #include "chrome/browser/chromeos/policy/device_status_collector.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 base::Bind(&DeviceStatusCollector::OnOSFirmware, | 514 base::Bind(&DeviceStatusCollector::OnOSFirmware, |
| 515 weak_factory_.GetWeakPtr())); | 515 weak_factory_.GetWeakPtr())); |
| 516 } | 516 } |
| 517 | 517 |
| 518 DeviceStatusCollector::~DeviceStatusCollector() { | 518 DeviceStatusCollector::~DeviceStatusCollector() { |
| 519 } | 519 } |
| 520 | 520 |
| 521 // static | 521 // static |
| 522 void DeviceStatusCollector::RegisterPrefs(PrefRegistrySimple* registry) { | 522 void DeviceStatusCollector::RegisterPrefs(PrefRegistrySimple* registry) { |
| 523 registry->RegisterDictionaryPref(prefs::kDeviceActivityTimes, | 523 registry->RegisterDictionaryPref(prefs::kDeviceActivityTimes, |
| 524 new base::DictionaryValue); | 524 base::MakeUnique<base::DictionaryValue>()); |
| 525 } | 525 } |
| 526 | 526 |
| 527 // static | 527 // static |
| 528 void DeviceStatusCollector::RegisterProfilePrefs(PrefRegistrySimple* registry) { | 528 void DeviceStatusCollector::RegisterProfilePrefs(PrefRegistrySimple* registry) { |
| 529 registry->RegisterBooleanPref(prefs::kReportArcStatusEnabled, false); | 529 registry->RegisterBooleanPref(prefs::kReportArcStatusEnabled, false); |
| 530 } | 530 } |
| 531 | 531 |
| 532 void DeviceStatusCollector::CheckIdleState() { | 532 void DeviceStatusCollector::CheckIdleState() { |
| 533 CalculateIdleState(kIdleStateThresholdSeconds, | 533 CalculateIdleState(kIdleStateThresholdSeconds, |
| 534 base::Bind(&DeviceStatusCollector::IdleStateCallback, | 534 base::Bind(&DeviceStatusCollector::IdleStateCallback, |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1268 | 1268 |
| 1269 void DeviceStatusCollector::OnOSVersion(const std::string& version) { | 1269 void DeviceStatusCollector::OnOSVersion(const std::string& version) { |
| 1270 os_version_ = version; | 1270 os_version_ = version; |
| 1271 } | 1271 } |
| 1272 | 1272 |
| 1273 void DeviceStatusCollector::OnOSFirmware(const std::string& version) { | 1273 void DeviceStatusCollector::OnOSFirmware(const std::string& version) { |
| 1274 firmware_version_ = version; | 1274 firmware_version_ = version; |
| 1275 } | 1275 } |
| 1276 | 1276 |
| 1277 } // namespace policy | 1277 } // namespace policy |
| OLD | NEW |