| Index: chrome/browser/media/webrtc/media_permission.cc
|
| diff --git a/chrome/browser/media/webrtc/media_permission.cc b/chrome/browser/media/webrtc/media_permission.cc
|
| index 13b3dcafa73d0899a8155179a12f26714687fd1e..b330bdf238c4f0b5c81b29e33bcbdac7793de8e9 100644
|
| --- a/chrome/browser/media/webrtc/media_permission.cc
|
| +++ b/chrome/browser/media/webrtc/media_permission.cc
|
| @@ -115,45 +115,3 @@ ContentSetting MediaPermission::GetPermissionStatus(
|
| *denial_reason = content::MEDIA_DEVICE_PERMISSION_DENIED;
|
| return content_setting;
|
| }
|
| -
|
| -ContentSetting MediaPermission::GetPermissionStatusWithDeviceRequired(
|
| - const std::string& device_id,
|
| - content::MediaStreamRequestResult* denial_reason) const {
|
| - // Deny the request if there is no device attached to the OS of the requested
|
| - // type.
|
| - if (!HasAvailableDevices(device_id)) {
|
| - *denial_reason = content::MEDIA_DEVICE_NO_HARDWARE;
|
| - return CONTENT_SETTING_BLOCK;
|
| - }
|
| -
|
| - return GetPermissionStatus(denial_reason);
|
| -}
|
| -
|
| -bool MediaPermission::HasAvailableDevices(const std::string& device_id) const {
|
| - const content::MediaStreamDevices* devices = nullptr;
|
| - if (content_type_ == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC) {
|
| - devices =
|
| - &MediaCaptureDevicesDispatcher::GetInstance()->GetAudioCaptureDevices();
|
| - } else if (content_type_ == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA) {
|
| - devices =
|
| - &MediaCaptureDevicesDispatcher::GetInstance()->GetVideoCaptureDevices();
|
| - } else {
|
| - NOTREACHED();
|
| - }
|
| -
|
| - // TODO(tommi): It's kind of strange to have this here since if we fail this
|
| - // test, there'll be a UI shown that indicates to the user that access to
|
| - // non-existing audio/video devices has been denied. The user won't have
|
| - // any way to change that but there will be a UI shown which indicates that
|
| - // access is blocked.
|
| - if (devices->empty())
|
| - return false;
|
| -
|
| - // Note: we check device_id before dereferencing devices. If the requested
|
| - // device id is non-empty, then the corresponding device list must not be
|
| - // NULL.
|
| - if (!device_id.empty() && !devices->FindById(device_id))
|
| - return false;
|
| -
|
| - return true;
|
| -}
|
|
|