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

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

Issue 907323002: Implemented DeviceStatusCollector::GetDeviceSessionStatus() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 #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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Virtual to allow mocking. 104 // Virtual to allow mocking.
105 virtual bool IsAutoLaunchedKioskSession(); 105 virtual bool IsAutoLaunchedKioskSession();
106 106
107 // Samples the current CPU and RAM usage and updates our cache of samples. 107 // Samples the current CPU and RAM usage and updates our cache of samples.
108 void SampleResourceUsage(); 108 void SampleResourceUsage();
109 109
110 // Returns the percentage of total CPU that each process uses. Virtual so it 110 // Returns the percentage of total CPU that each process uses. Virtual so it
111 // can be mocked. 111 // can be mocked.
112 virtual std::vector<double> GetPerProcessCPUUsage(); 112 virtual std::vector<double> GetPerProcessCPUUsage();
113 113
114 // Gets the version of the passed app. Virtual to allow mocking.
115 virtual std::string GetAppVersion(std::string app_id);
bartfab (slow) 2015/02/11 17:28:43 Nit: Pass |app_id| by const ref.
Andrew T Wilson (Slow) 2015/02/12 15:15:39 Done.
116
114 // The number of days in the past to store device activity. 117 // The number of days in the past to store device activity.
115 // This is kept in case device status uploads fail for a number of days. 118 // This is kept in case device status uploads fail for a number of days.
116 unsigned int max_stored_past_activity_days_; 119 unsigned int max_stored_past_activity_days_;
117 120
118 // The number of days in the future to store device activity. 121 // The number of days in the future to store device activity.
119 // When changing the system time and/or timezones, it's possible to record 122 // When changing the system time and/or timezones, it's possible to record
120 // activity time that is slightly in the future. 123 // activity time that is slightly in the future.
121 unsigned int max_stored_future_activity_days_; 124 unsigned int max_stored_future_activity_days_;
122 125
123 private: 126 private:
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 geolocation_subscription_; 231 geolocation_subscription_;
229 232
230 // Cached values of the reporting settings from the device policy. 233 // Cached values of the reporting settings from the device policy.
231 bool report_version_info_; 234 bool report_version_info_;
232 bool report_activity_times_; 235 bool report_activity_times_;
233 bool report_boot_mode_; 236 bool report_boot_mode_;
234 bool report_location_; 237 bool report_location_;
235 bool report_network_interfaces_; 238 bool report_network_interfaces_;
236 bool report_users_; 239 bool report_users_;
237 bool report_hardware_status_; 240 bool report_hardware_status_;
241 bool report_session_status_;
238 242
239 scoped_ptr<chromeos::CrosSettings::ObserverSubscription> 243 scoped_ptr<chromeos::CrosSettings::ObserverSubscription>
240 version_info_subscription_; 244 version_info_subscription_;
241 scoped_ptr<chromeos::CrosSettings::ObserverSubscription> 245 scoped_ptr<chromeos::CrosSettings::ObserverSubscription>
242 activity_times_subscription_; 246 activity_times_subscription_;
243 scoped_ptr<chromeos::CrosSettings::ObserverSubscription> 247 scoped_ptr<chromeos::CrosSettings::ObserverSubscription>
244 boot_mode_subscription_; 248 boot_mode_subscription_;
245 scoped_ptr<chromeos::CrosSettings::ObserverSubscription> 249 scoped_ptr<chromeos::CrosSettings::ObserverSubscription>
246 location_subscription_; 250 location_subscription_;
247 scoped_ptr<chromeos::CrosSettings::ObserverSubscription> 251 scoped_ptr<chromeos::CrosSettings::ObserverSubscription>
248 network_interfaces_subscription_; 252 network_interfaces_subscription_;
249 scoped_ptr<chromeos::CrosSettings::ObserverSubscription> 253 scoped_ptr<chromeos::CrosSettings::ObserverSubscription>
250 users_subscription_; 254 users_subscription_;
251 scoped_ptr<chromeos::CrosSettings::ObserverSubscription> 255 scoped_ptr<chromeos::CrosSettings::ObserverSubscription>
252 hardware_status_subscription_; 256 hardware_status_subscription_;
257 scoped_ptr<chromeos::CrosSettings::ObserverSubscription>
258 session_status_subscription_;
253 259
254 base::WeakPtrFactory<DeviceStatusCollector> weak_factory_; 260 base::WeakPtrFactory<DeviceStatusCollector> weak_factory_;
255 261
256 DISALLOW_COPY_AND_ASSIGN(DeviceStatusCollector); 262 DISALLOW_COPY_AND_ASSIGN(DeviceStatusCollector);
257 }; 263 };
258 264
259 } // namespace policy 265 } // namespace policy
260 266
261 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_STATUS_COLLECTOR_H_ 267 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_STATUS_COLLECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698