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

Unified Diff: chrome/browser/chromeos/device_settings_provider.cc

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 reviewer 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
Index: chrome/browser/chromeos/device_settings_provider.cc
diff --git a/chrome/browser/chromeos/device_settings_provider.cc b/chrome/browser/chromeos/device_settings_provider.cc
index 51d6dc6b433473eb6e50153703f1a2acaeae2c70..bf7a851886f32bed0799a52bff93cce7a4c06349 100644
--- a/chrome/browser/chromeos/device_settings_provider.cc
+++ b/chrome/browser/chromeos/device_settings_provider.cc
@@ -41,7 +41,10 @@ const char* kBooleanSettings[] = {
kAccountsPrefAllowGuest,
kAccountsPrefShowUserNamesOnSignIn,
kSignedDataRoamingEnabled,
- kStatsReportingPref
+ kStatsReportingPref,
+ kReportDeviceVersionInfo,
+ kReportDeviceActivityTimes,
+ kReportDeviceBootMode
};
const char* kStringSettings[] = {
@@ -403,6 +406,21 @@ void DeviceSettingsProvider::UpdateValuesCache() {
}
new_values_cache.SetValue(kAccountsPrefUsers, list);
+ if (pol.has_device_reporting()) {
+ if (pol.device_reporting().has_report_version_info()) {
+ new_values_cache.SetBoolean(kReportDeviceVersionInfo,
+ pol.device_reporting().report_version_info());
+ }
+ if (pol.device_reporting().has_report_activity_times()) {
+ new_values_cache.SetBoolean(kReportDeviceActivityTimes,
+ pol.device_reporting().report_activity_times());
+ }
+ if (pol.device_reporting().has_report_boot_mode()) {
+ new_values_cache.SetBoolean(kReportDeviceBootMode,
+ pol.device_reporting().report_boot_mode());
+ }
+ }
+
// Collect all notifications but send them only after we have swapped the
// cache so that if somebody actually reads the cache will be already valid.
std::vector<std::string> notifications;

Powered by Google App Engine
This is Rietveld 408576698