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

Unified Diff: chrome/browser/chromeos/policy/device_status_collector.cc

Issue 2736903004: Add sound volume to device attribute reporting (Closed)
Patch Set: Simplified - bundling sound volume together with hardware status Created 3 years, 9 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/chromeos/policy/device_status_collector_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/policy/device_status_collector.cc
diff --git a/chrome/browser/chromeos/policy/device_status_collector.cc b/chrome/browser/chromeos/policy/device_status_collector.cc
index 06a4c76a7ce5217da056ec226e24a643977e3d94..f58540c7465c7d37f9017a7441facb5699d8e249 100644
--- a/chrome/browser/chromeos/policy/device_status_collector.cc
+++ b/chrome/browser/chromeos/policy/device_status_collector.cc
@@ -43,6 +43,7 @@
#include "chrome/browser/policy/profile_policy_connector_factory.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/pref_names.h"
+#include "chromeos/audio/cras_audio_handler.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/update_engine_client.h"
#include "chromeos/disks/disk_mount_manager.h"
@@ -989,6 +990,11 @@ bool DeviceStatusCollector::GetHardwareStatus(
status->add_cpu_utilization_pct(usage.cpu_usage_percent);
status->add_system_ram_free(usage.bytes_of_ram_free);
}
+
+ // Get the current device sound volume level.
+ chromeos::CrasAudioHandler* audio_handler = chromeos::CrasAudioHandler::Get();
+ status->set_sound_volume(audio_handler->GetOutputVolumePercent());
+
return true;
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/device_status_collector_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698