| 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 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_STATUS_COLLECTOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_STATUS_COLLECTOR_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_STATUS_COLLECTOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_STATUS_COLLECTOR_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 // content::GeolocationUpdateCallback implementation. | 178 // content::GeolocationUpdateCallback implementation. |
| 179 void ReceiveGeolocationUpdate(const content::Geoposition&); | 179 void ReceiveGeolocationUpdate(const content::Geoposition&); |
| 180 | 180 |
| 181 // Callback invoked to update our cached disk information. | 181 // Callback invoked to update our cached disk information. |
| 182 void ReceiveVolumeInfo( | 182 void ReceiveVolumeInfo( |
| 183 const std::vector<enterprise_management::VolumeInfo>& info); | 183 const std::vector<enterprise_management::VolumeInfo>& info); |
| 184 | 184 |
| 185 // Callback invoked to update our cpu usage information. | 185 // Callback invoked to update our cpu usage information. |
| 186 void ReceiveCPUStatistics(const std::string& statistics); | 186 void ReceiveCPUStatistics(const std::string& statistics); |
| 187 | 187 |
| 188 // Helper routine to convert from Shill-provided signal strength (percent) |
| 189 // to dBm units expected by server. |
| 190 int ConvertWifiSignalStrength(int signal_strength); |
| 191 |
| 188 PrefService* local_state_; | 192 PrefService* local_state_; |
| 189 | 193 |
| 190 // The last time an idle state check was performed. | 194 // The last time an idle state check was performed. |
| 191 base::Time last_idle_check_; | 195 base::Time last_idle_check_; |
| 192 | 196 |
| 193 // The maximum key that went into the last report generated by | 197 // The maximum key that went into the last report generated by |
| 194 // GetDeviceStatus(), and the duration for it. This is used to trim the | 198 // GetDeviceStatus(), and the duration for it. This is used to trim the |
| 195 // stored data in OnSubmittedSuccessfully(). Trimming is delayed so | 199 // stored data in OnSubmittedSuccessfully(). Trimming is delayed so |
| 196 // unsuccessful uploads don't result in dropped data. | 200 // unsuccessful uploads don't result in dropped data. |
| 197 int64 last_reported_day_; | 201 int64 last_reported_day_; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 session_status_subscription_; | 278 session_status_subscription_; |
| 275 | 279 |
| 276 base::WeakPtrFactory<DeviceStatusCollector> weak_factory_; | 280 base::WeakPtrFactory<DeviceStatusCollector> weak_factory_; |
| 277 | 281 |
| 278 DISALLOW_COPY_AND_ASSIGN(DeviceStatusCollector); | 282 DISALLOW_COPY_AND_ASSIGN(DeviceStatusCollector); |
| 279 }; | 283 }; |
| 280 | 284 |
| 281 } // namespace policy | 285 } // namespace policy |
| 282 | 286 |
| 283 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_STATUS_COLLECTOR_H_ | 287 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_STATUS_COLLECTOR_H_ |
| OLD | NEW |