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

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

Issue 845313008: Refactored device status uploading out of policy fetch infrastructure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback. Created 5 years, 10 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 <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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/device_status_collector.h ('k') | chrome/browser/chromeos/policy/status_uploader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698