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

Unified Diff: chromeos/audio/audio_device.cc

Issue 1380103003: Store audio device's active state in preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed code review comments Created 5 years 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 | « chromeos/audio/audio_device.h ('k') | chromeos/audio/audio_devices_pref_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/audio/audio_device.cc
diff --git a/chromeos/audio/audio_device.cc b/chromeos/audio/audio_device.cc
index 5374194edd0eb1d7f3d1f01cc792941167ded10a..bba79db6e311a5db21f9a4f3c31f0e9aeaf17465 100644
--- a/chromeos/audio/audio_device.cc
+++ b/chromeos/audio/audio_device.cc
@@ -109,6 +109,7 @@ AudioDeviceType AudioDevice::GetAudioType(
AudioDevice::AudioDevice()
: is_input(false),
id(0),
+ stable_device_id(0),
display_name(""),
type(AUDIO_TYPE_OTHER),
priority(0),
@@ -119,6 +120,7 @@ AudioDevice::AudioDevice()
AudioDevice::AudioDevice(const AudioNode& node) {
is_input = node.is_input;
id = node.id;
+ stable_device_id = node.stable_device_id;
type = GetAudioType(node.type);
if (!node.name.empty() && node.name != "(default)")
display_name = node.name;
@@ -155,6 +157,8 @@ std::string AudioDevice::ToString() const {
"plugged_time= %s ",
base::Uint64ToString(plugged_time).c_str());
base::StringAppendF(&result, "mic_positions = %s ", mic_positions.c_str());
+ base::StringAppendF(&result, "stable_device_id = %lu ",
+ stable_device_id);
jennyz 2016/01/05 23:46:55 nit: how about moving this after line 143 to keep
hychao 2016/01/06 06:34:12 Done.
return result;
}
« no previous file with comments | « chromeos/audio/audio_device.h ('k') | chromeos/audio/audio_devices_pref_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698