Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: chrome/browser/chromeos/policy/device_status_collector.cc

Issue 2784513002: Move PrefRegistrySimple to use unique_ptr<Value> (Closed)
Patch Set: Android Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.cc ('k') | chrome/browser/plugins/plugins_resource_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698