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

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

Issue 9289017: Apply individual policies for the various parts of device status reports. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Julian's comments. Created 8 years, 11 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 | « chrome/browser/policy/device_policy_cache.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 4f1c772c45bd5e22c5c4310d806aaf5df50356c5..1d6d1f0b57d3a5436f1c5de8a78cc39e7b07f6b6 100644
--- a/chrome/browser/policy/device_status_collector.h
+++ b/chrome/browser/policy/device_status_collector.h
@@ -10,8 +10,10 @@
#include "base/timer.h"
#include "chrome/browser/chromeos/version_loader.h"
#include "chrome/browser/idle.h"
+#include "content/public/browser/notification_observer.h"
namespace chromeos {
+class CrosSettings;
namespace system {
class StatisticsProvider;
}
@@ -26,7 +28,7 @@ class PrefService;
namespace policy {
// Collects and summarizes the status of an enterprised-managed ChromeOS device.
-class DeviceStatusCollector {
+class DeviceStatusCollector : public content::NotificationObserver {
public:
DeviceStatusCollector(PrefService* local_state,
chromeos::system::StatisticsProvider* provider);
@@ -61,6 +63,23 @@ class DeviceStatusCollector {
void OnOSFirmware(chromeos::VersionLoader::Handle handle,
std::string version);
+ // Helpers for the various portions of the status.
+ void GetActivityTimes(
+ enterprise_management::DeviceStatusReportRequest* request);
+ void GetVersionInfo(
+ enterprise_management::DeviceStatusReportRequest* request);
+ void GetBootMode(
+ enterprise_management::DeviceStatusReportRequest* request);
+
+ // Update the cached values of the reporting settings.
+ void UpdateReportingSettings();
+
+ // content::NotificationObserver interface.
+ virtual void Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
// How often to poll to see if the user is idle.
int poll_interval_seconds_;
@@ -82,6 +101,13 @@ class DeviceStatusCollector {
chromeos::system::StatisticsProvider* statistics_provider_;
+ chromeos::CrosSettings* cros_settings_;
+
+ // Cached values of the reporting settings from the device policy.
+ bool report_version_info_;
+ bool report_activity_times_;
+ bool report_boot_mode_;
+
DISALLOW_COPY_AND_ASSIGN(DeviceStatusCollector);
};
« no previous file with comments | « chrome/browser/policy/device_policy_cache.cc ('k') | chrome/browser/policy/device_status_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698