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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/device_status_collector.h
diff --git a/chrome/browser/chromeos/policy/device_status_collector.h b/chrome/browser/chromeos/policy/device_status_collector.h
index e4b1f73327fb9ab272d4b5fe3e31904910ea3292..78414b920bcce0c76e1b3c3a418bfd4dfd88ec6d 100644
--- a/chrome/browser/chromeos/policy/device_status_collector.h
+++ b/chrome/browser/chromeos/policy/device_status_collector.h
@@ -43,6 +43,8 @@ class PrefService;
namespace policy {
+struct DeviceLocalAccount;
+
// Collects and summarizes the status of an enterprised-managed ChromeOS device.
class DeviceStatusCollector {
public:
@@ -99,10 +101,11 @@ class DeviceStatusCollector {
// Callback which receives the results of the idle state check.
void IdleStateCallback(ui::IdleState state);
- // Returns true if the currently active session is an auto-launched
- // kiosk session (this enables functionality such as network reporting).
+ // Returns the DeviceLocalAccount associated with the currently active
+ // kiosk session, if the session was auto-launched with zero delay
+ // (this enables functionality such as network reporting).
// Virtual to allow mocking.
- virtual bool IsAutoLaunchedKioskSession();
+ virtual scoped_ptr<DeviceLocalAccount> GetAutoLaunchedKioskSessionInfo();
// Samples the current CPU and RAM usage and updates our cache of samples.
void SampleResourceUsage();
@@ -111,6 +114,9 @@ class DeviceStatusCollector {
// can be mocked.
virtual std::vector<double> GetPerProcessCPUUsage();
+ // Gets the version of the passed app. Virtual to allow mocking.
+ virtual std::string GetAppVersion(const std::string& app_id);
+
// The number of days in the past to store device activity.
// This is kept in case device status uploads fail for a number of days.
unsigned int max_stored_past_activity_days_;

Powered by Google App Engine
This is Rietveld 408576698