| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <sys/statvfs.h> | 9 #include <sys/statvfs.h> |
| 10 | 10 |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 if (report_network_interfaces_) | 680 if (report_network_interfaces_) |
| 681 GetNetworkInterfaces(status); | 681 GetNetworkInterfaces(status); |
| 682 | 682 |
| 683 if (report_users_) { | 683 if (report_users_) { |
| 684 GetUsers(status); | 684 GetUsers(status); |
| 685 } | 685 } |
| 686 | 686 |
| 687 if (report_hardware_status_) | 687 if (report_hardware_status_) |
| 688 GetHardwareStatus(status); | 688 GetHardwareStatus(status); |
| 689 | 689 |
| 690 return true; | 690 return (report_activity_times_ || |
| 691 report_version_info_ || |
| 692 report_boot_mode_ || |
| 693 report_location_ || |
| 694 report_network_interfaces_ || |
| 695 report_users_ || |
| 696 report_hardware_status_); |
| 691 } | 697 } |
| 692 | 698 |
| 693 bool DeviceStatusCollector::GetSessionStatus( | 699 bool DeviceStatusCollector::GetDeviceSessionStatus( |
| 694 em::SessionStatusReportRequest* status) { | 700 em::SessionStatusReportRequest* status) { |
| 695 return false; | 701 return false; |
| 696 } | 702 } |
| 697 | 703 |
| 698 void DeviceStatusCollector::OnSubmittedSuccessfully() { | 704 void DeviceStatusCollector::OnSubmittedSuccessfully() { |
| 699 TrimStoredActivityPeriods(last_reported_day_, duration_for_last_reported_day_, | 705 TrimStoredActivityPeriods(last_reported_day_, duration_for_last_reported_day_, |
| 700 std::numeric_limits<int64>::max()); | 706 std::numeric_limits<int64>::max()); |
| 701 } | 707 } |
| 702 | 708 |
| 703 void DeviceStatusCollector::OnOSVersion(const std::string& version) { | 709 void DeviceStatusCollector::OnOSVersion(const std::string& version) { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 ScheduleGeolocationUpdateRequest(); | 772 ScheduleGeolocationUpdateRequest(); |
| 767 } | 773 } |
| 768 | 774 |
| 769 void DeviceStatusCollector::ReceiveVolumeInfo( | 775 void DeviceStatusCollector::ReceiveVolumeInfo( |
| 770 const std::vector<em::VolumeInfo>& info) { | 776 const std::vector<em::VolumeInfo>& info) { |
| 771 if (report_hardware_status_) | 777 if (report_hardware_status_) |
| 772 volume_info_ = info; | 778 volume_info_ = info; |
| 773 } | 779 } |
| 774 | 780 |
| 775 } // namespace policy | 781 } // namespace policy |
| OLD | NEW |