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

Unified Diff: chrome/browser/policy/device_status_collector.h

Issue 8920003: Add OS and firmware version to device status reports. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Wrap #includes for ChromeOS. Created 9 years 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
« no previous file with comments | « chrome/browser/policy/cloud_policy_data_store.cc ('k') | chrome/browser/policy/device_status_collector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/device_status_collector.h
diff --git a/chrome/browser/policy/device_status_collector.h b/chrome/browser/policy/device_status_collector.h
index cef45ffe4f413c2d66006ab9c628d8c67430b9f7..2be0a157bb9f466c97134f2532cae5e8abc9f0d2 100644
--- a/chrome/browser/policy/device_status_collector.h
+++ b/chrome/browser/policy/device_status_collector.h
@@ -8,10 +8,9 @@
#include "base/time.h"
#include "base/timer.h"
+#include "chrome/browser/chromeos/version_loader.h"
#include "chrome/browser/idle.h"
-using base::Time;
-
namespace enterprise_management {
class DeviceStatusReportRequest;
}
@@ -37,8 +36,8 @@ class DeviceStatusCollector {
// Check whether the user has been idle for a certain period of time.
virtual void CheckIdleState();
- // Used instead of Time::Now(), to make testing possible.
- virtual Time GetCurrentTime();
+ // Used instead of base::Time::Now(), to make testing possible.
+ virtual base::Time GetCurrentTime();
// Callback which receives the results of the idle state check.
void IdleStateCallback(IdleState state);
@@ -49,19 +48,31 @@ class DeviceStatusCollector {
private:
void AddActivePeriod(base::Time start, base::Time end);
+ // Callbacks from chromeos::VersionLoader.
+ void OnOSVersion(chromeos::VersionLoader::Handle handle,
+ std::string version);
+ void OnOSFirmware(chromeos::VersionLoader::Handle handle,
+ std::string version);
+
// How often to poll to see if the user is idle.
int poll_interval_seconds_;
PrefService* local_state_;
// The last time an idle state check was performed.
- Time last_idle_check_;
+ base::Time last_idle_check_;
// The idle state the last time it was checked.
IdleState last_idle_state_;
base::RepeatingTimer<DeviceStatusCollector> timer_;
+ chromeos::VersionLoader version_loader_;
+ CancelableRequestConsumer consumer_;
+
+ std::string os_version_;
+ std::string firmware_version_;
+
DISALLOW_COPY_AND_ASSIGN(DeviceStatusCollector);
};
« no previous file with comments | « chrome/browser/policy/cloud_policy_data_store.cc ('k') | chrome/browser/policy/device_status_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698