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

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

Issue 9348105: Aggregate device activity, and report per-day activity in device status reports. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: arg. Created 8 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
« no previous file with comments | « no previous file | 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 1d6d1f0b57d3a5436f1c5de8a78cc39e7b07f6b6..4afffcb09a12ae3b33f9fd7ac157e2aa46c3ca29 100644
--- a/chrome/browser/policy/device_status_collector.h
+++ b/chrome/browser/policy/device_status_collector.h
@@ -51,10 +51,20 @@ class DeviceStatusCollector : public content::NotificationObserver {
// Callback which receives the results of the idle state check.
void IdleStateCallback(IdleState state);
- // The maximum number of active periods timestamps to be stored.
- unsigned int max_stored_active_periods_;
+ // 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_;
+
+ // The number of days in the future to store device activity.
+ // When changing the system time and/or timezones, it's possible to record
+ // activity time that is slightly in the future.
+ unsigned int max_stored_future_activity_days_;
private:
+ // Prevents the local store of activity periods from growing too large by
+ // removing entries that are outside the reporting window.
+ void PruneStoredActivityPeriods(base::Time base_time);
+
void AddActivePeriod(base::Time start, base::Time end);
// Callbacks from chromeos::VersionLoader.
@@ -88,9 +98,6 @@ class DeviceStatusCollector : public content::NotificationObserver {
// The last time an idle state check was performed.
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_;
« no previous file with comments | « no previous file | chrome/browser/policy/device_status_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698