Chromium Code Reviews| Index: chrome/browser/media/webrtc/media_stream_devices_controller.cc |
| diff --git a/chrome/browser/media/webrtc/media_stream_devices_controller.cc b/chrome/browser/media/webrtc/media_stream_devices_controller.cc |
| index 2ee1bf2bafb9861b76a3de6018ff83ad81b0987b..69e37ddcedc6225ad4ba2dc9674d0af137eb7306 100644 |
| --- a/chrome/browser/media/webrtc/media_stream_devices_controller.cc |
| +++ b/chrome/browser/media/webrtc/media_stream_devices_controller.cc |
| @@ -291,7 +291,11 @@ MediaStreamDevicesController::Request::GetPermissionRequestType() const { |
| bool MediaStreamDevicesController::Request::ShouldShowPersistenceToggle() |
| const { |
| - return PermissionUtil::ShouldShowPersistenceToggle(); |
| + if (IsAskingForVideo()) |
| + return PermissionUtil::ShouldShowPersistenceToggle( |
| + CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA); |
|
raymes
2017/05/30 03:58:58
nit: {} for multi-line if
|
| + return PermissionUtil::ShouldShowPersistenceToggle( |
| + CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC); |
|
raymes
2017/05/30 03:58:58
If we're asking for both mic and camera, should we
Timothy Loh
2017/05/30 05:52:43
I changed this to just check CAMERA and added a co
|
| } |
| // Implementation of PermissionPromptDelegate which actually shows a permission |