Chromium Code Reviews| 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 cc371d52d592f293d56bd227a80b3e7f64914d6e..6a8dfbbcf909e37c75b1b5c60a7eec19af09ee7c 100644 |
| --- a/chrome/browser/media/media_stream_devices_controller.cc |
| +++ b/chrome/browser/media/media_stream_devices_controller.cc |
| @@ -500,8 +500,12 @@ void MediaStreamDevicesController::RequestFinished() { |
| bool MediaStreamDevicesController::IsRequestAllowedByDefault() const { |
| // The request from internal objects like chrome://URLs is always allowed. |
| - if (CheckAllowAllMediaStreamContentForOrigin(profile_, |
| - request_.security_origin)) { |
| + if (CheckAllowAllMediaStreamContentForOrigin( |
| + profile_, request_.security_origin, |
| + CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC) && |
| + CheckAllowAllMediaStreamContentForOrigin( |
| + profile_, request_.security_origin, |
| + CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA)) { |
| return true; |
| } |
| @@ -586,13 +590,12 @@ int MediaStreamDevicesController::FilterBlockedByDefaultDevices() { |
| bool MediaStreamDevicesController::IsDefaultMediaAccessBlocked() const { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| - // TODO(markusheintz): Replace CONTENT_SETTINGS_TYPE_MEDIA_STREAM with the |
| - // appropriate new CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC and |
| - // CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA. |
| - ContentSetting current_setting = |
| - profile_->GetHostContentSettingsMap()->GetDefaultContentSetting( |
| - CONTENT_SETTINGS_TYPE_MEDIASTREAM, NULL); |
| - return (current_setting == CONTENT_SETTING_BLOCK); |
| + return (profile_->GetHostContentSettingsMap()->GetDefaultContentSetting( |
| + CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, NULL |
| + ) == CONTENT_SETTING_BLOCK && |
|
markusheintz_
2015/03/06 16:05:33
The closing ) should be in the previous line.
He
msramek
2015/03/06 17:47:33
Done.
|
| + profile_->GetHostContentSettingsMap()->GetDefaultContentSetting( |
| + CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, NULL |
| + ) == CONTENT_SETTING_BLOCK); |
| } |
| bool MediaStreamDevicesController::IsSchemeSecure() const { |