Index: chrome/browser/media/media_stream_devices_controller.cc |
diff --git a/chrome/browser/media/media_stream_devices_controller.cc b/chrome/browser/media/media_stream_devices_controller.cc |
index 169f7db4dc37de4499e941bec2e82fc5021936f3..10178b357aa3c9ad4ebd097a7ec3d8efbaa7182a 100644 |
--- a/chrome/browser/media/media_stream_devices_controller.cc |
+++ b/chrome/browser/media/media_stream_devices_controller.cc |
@@ -80,6 +80,18 @@ void MediaStreamDevicesController::RegisterUserPrefs(PrefService* prefs) { |
bool MediaStreamDevicesController::DismissInfoBarAndTakeActionOnSettings() { |
+ // If this is a no UI check for policies only go straight to accept - policy |
+ // check will be done automatically on the way. |
+ if (request_.request_type == content::OPEN_DEVICE) { |
no longer working on chromium
2012/12/10 10:17:56
thanks, the code is much clearer now since we are
|
+ std::string audio, video; |
+ if (has_audio_) |
+ audio = GetFirstDeviceId(content::MEDIA_DEVICE_AUDIO_CAPTURE); |
+ if (has_video_) |
+ video = GetFirstDeviceId(content::MEDIA_DEVICE_VIDEO_CAPTURE); |
+ Accept(audio, video, false); |
+ return true; |
+ } |
+ |
// For tab media requests, we need to make sure the request came from the |
// extension API, so we check the registry here. |
content::MediaStreamDeviceMap::const_iterator tab_video = |
@@ -138,7 +150,6 @@ bool MediaStreamDevicesController::DismissInfoBarAndTakeActionOnSettings() { |
return true; |
} |
- // Show the infobar. |
return false; |
} |