diff options
author | jennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-14 19:38:41 +0000 |
---|---|---|
committer | jennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-14 19:38:41 +0000 |
commit | 246ddf4c48c17e7ea801df936b121027c0e82094 (patch) | |
tree | 729cf905b03ef80ef29d3be9198ddd4f19272bd4 /chromeos/audio | |
parent | 80092a3286ea06759d0cd7a2b040ae2f19a50e55 (diff) | |
download | chromium_src-246ddf4c48c17e7ea801df936b121027c0e82094.zip chromium_src-246ddf4c48c17e7ea801df936b121027c0e82094.tar.gz chromium_src-246ddf4c48c17e7ea801df936b121027c0e82094.tar.bz2 |
Use device_name to create the device string id for storing audio preferences. Device name is much more unique than display_name for audio device.
BUG=272479
Review URL: https://chromiumcodereview.appspot.com/23009006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217612 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/audio')
-rw-r--r-- | chromeos/audio/audio_device.cc | 4 | ||||
-rw-r--r-- | chromeos/audio/audio_device.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/chromeos/audio/audio_device.cc b/chromeos/audio/audio_device.cc index 1448ec4..0ec9625 100644 --- a/chromeos/audio/audio_device.cc +++ b/chromeos/audio/audio_device.cc @@ -97,6 +97,7 @@ AudioDevice::AudioDevice(const AudioNode& node) { display_name = node.name; else display_name = node.device_name; + device_name = node.device_name; priority = GetDevicePriority(type); active = node.active; plugged_time = node.plugged_time; @@ -114,6 +115,9 @@ std::string AudioDevice::ToString() const { "display_name = %s ", display_name.c_str()); base::StringAppendF(&result, + "device_name = %s ", + device_name.c_str()); + base::StringAppendF(&result, "type = %s ", GetTypeString(type).c_str()); base::StringAppendF(&result, diff --git a/chromeos/audio/audio_device.h b/chromeos/audio/audio_device.h index 30712e2..5109ea2 100644 --- a/chromeos/audio/audio_device.h +++ b/chromeos/audio/audio_device.h @@ -31,6 +31,7 @@ struct CHROMEOS_EXPORT AudioDevice { bool is_input; uint64 id; std::string display_name; + std::string device_name; AudioDeviceType type; uint8 priority; bool active; |