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

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

Issue 1689593002: Do not check security origin for default audio output device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | no next file » | 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 5ef8d4315b6ee3928bf62ba69ab97dff2e75bc77..ca963294d840dc746e7cfc613f8f5e49c368de3d 100644
--- a/content/browser/renderer_host/media/audio_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host.cc
@@ -761,7 +761,10 @@ void AudioRendererHost::CheckOutputDeviceAccess(
const OutputDeviceAccessCB& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanRequestURL(
+ // Check security origin if nondefault device is requested.
+ // Ignore check for default device, which is always authorized.
+ if (!IsDefaultDeviceId(device_id) &&
+ !ChildProcessSecurityPolicyImpl::GetInstance()->CanRequestURL(
render_process_id_, gurl_security_origin)) {
content::bad_message::ReceivedBadMessage(this,
bad_message::ARH_UNAUTHORIZED_URL);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698