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

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: Tommi's comments 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/browser/renderer_host/media/media_stream_manager.h » ('j') | no next file with comments »
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) {
ajm 2015/09/28 22:47:18 Does it matter that ChromeOS is not using these ID
Guido Urdaneta 2015/09/29 10:36:12 No, it does not matter. This is a check for hashed
tommi (sloooow) - chröme 2015/09/29 11:59:51 Is it using any other "known-and-not-translated" I
ajm 2015/09/29 16:00:55 Great, thanks.
ajm 2015/09/29 16:00:55 No.
return true;
+ }
if (device_id.length() != kValidLength)
return false;
« no previous file with comments | « no previous file | content/browser/renderer_host/media/media_stream_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698