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

Unified Diff: content/browser/renderer_host/media/audio_renderer_host.cc

Issue 1369723003: Do not hash default and communications media device ID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | content/public/browser/media_device_id.cc » ('j') | content/public/browser/media_device_id.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/audio_renderer_host.cc
diff --git a/content/browser/renderer_host/media/audio_renderer_host.cc b/content/browser/renderer_host/media/audio_renderer_host.cc
index 8196c8701c403d6c26f2bda9b08998b8d833e630..1b72daa1cb654477ad0b2089c579dcde0b52c4ce 100644
--- a/content/browser/renderer_host/media/audio_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host.cc
@@ -82,8 +82,11 @@ GURL ConvertToGURL(const url::Origin& origin) {
bool IsValidDeviceId(const std::string& device_id) {
static const std::string::size_type kValidLength = 64;
- if (device_id.empty())
+ if (device_id.empty() ||
+ device_id == media::AudioManagerBase::kDefaultDeviceId ||
+ device_id == media::AudioManagerBase::kCommunicationsDeviceId) {
return true;
+ }
if (device_id.length() != kValidLength)
return false;
« no previous file with comments | « no previous file | content/public/browser/media_device_id.cc » ('j') | content/public/browser/media_device_id.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698