OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/settings/device_settings_provider.h" | 5 #include "chrome/browser/chromeos/settings/device_settings_provider.h" |
6 | 6 |
7 #include <memory.h> | 7 #include <memory.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 kReportDeviceActivityTimes, | 80 kReportDeviceActivityTimes, |
81 kReportDeviceBootMode, | 81 kReportDeviceBootMode, |
82 kReportDeviceHardwareStatus, | 82 kReportDeviceHardwareStatus, |
83 kReportDeviceLocation, | 83 kReportDeviceLocation, |
84 kReportDeviceNetworkInterfaces, | 84 kReportDeviceNetworkInterfaces, |
85 kReportDeviceSessionStatus, | 85 kReportDeviceSessionStatus, |
86 kReportDeviceUsers, | 86 kReportDeviceUsers, |
87 kReportDeviceVersionInfo, | 87 kReportDeviceVersionInfo, |
88 kReportOsUpdateStatus, | 88 kReportOsUpdateStatus, |
89 kReportRunningKioskApp, | 89 kReportRunningKioskApp, |
| 90 kReportSoundVolume, |
90 kReportUploadFrequency, | 91 kReportUploadFrequency, |
91 kServiceAccountIdentity, | 92 kServiceAccountIdentity, |
92 kSignedDataRoamingEnabled, | 93 kSignedDataRoamingEnabled, |
93 kStartUpFlags, | 94 kStartUpFlags, |
94 kStatsReportingPref, | 95 kStatsReportingPref, |
95 kSystemLogUploadEnabled, | 96 kSystemLogUploadEnabled, |
96 kSystemTimezonePolicy, | 97 kSystemTimezonePolicy, |
97 kSystemUse24HourClock, | 98 kSystemUse24HourClock, |
98 kTargetVersionPrefix, | 99 kTargetVersionPrefix, |
99 kUpdateDisabled, | 100 kUpdateDisabled, |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 } | 428 } |
428 if (reporting_policy.has_report_running_kiosk_app()) { | 429 if (reporting_policy.has_report_running_kiosk_app()) { |
429 new_values_cache->SetBoolean(kReportRunningKioskApp, | 430 new_values_cache->SetBoolean(kReportRunningKioskApp, |
430 reporting_policy.report_running_kiosk_app()); | 431 reporting_policy.report_running_kiosk_app()); |
431 } | 432 } |
432 if (reporting_policy.has_device_status_frequency()) { | 433 if (reporting_policy.has_device_status_frequency()) { |
433 new_values_cache->SetInteger( | 434 new_values_cache->SetInteger( |
434 kReportUploadFrequency, | 435 kReportUploadFrequency, |
435 reporting_policy.device_status_frequency()); | 436 reporting_policy.device_status_frequency()); |
436 } | 437 } |
| 438 if (reporting_policy.has_report_sound_volume()) { |
| 439 new_values_cache->SetBoolean(kReportSoundVolume, |
| 440 reporting_policy.report_sound_volume()); |
| 441 } |
437 } | 442 } |
438 } | 443 } |
439 | 444 |
440 void DecodeHeartbeatPolicies( | 445 void DecodeHeartbeatPolicies( |
441 const em::ChromeDeviceSettingsProto& policy, | 446 const em::ChromeDeviceSettingsProto& policy, |
442 PrefValueMap* new_values_cache) { | 447 PrefValueMap* new_values_cache) { |
443 if (!policy.has_device_heartbeat_settings()) | 448 if (!policy.has_device_heartbeat_settings()) |
444 return; | 449 return; |
445 | 450 |
446 const em::DeviceHeartbeatSettingsProto& heartbeat_policy = | 451 const em::DeviceHeartbeatSettingsProto& heartbeat_policy = |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 // Notify the observers we are done. | 905 // Notify the observers we are done. |
901 std::vector<base::Closure> callbacks; | 906 std::vector<base::Closure> callbacks; |
902 callbacks.swap(callbacks_); | 907 callbacks.swap(callbacks_); |
903 for (size_t i = 0; i < callbacks.size(); ++i) | 908 for (size_t i = 0; i < callbacks.size(); ++i) |
904 callbacks[i].Run(); | 909 callbacks[i].Run(); |
905 | 910 |
906 return settings_loaded; | 911 return settings_loaded; |
907 } | 912 } |
908 | 913 |
909 } // namespace chromeos | 914 } // namespace chromeos |
OLD | NEW |