diff --git a/shell/browser/web_contents_permission_helper.cc b/shell/browser/web_contents_permission_helper.cc index 40f77feed169..ff3c01c34bc0 100644 --- a/shell/browser/web_contents_permission_helper.cc +++ b/shell/browser/web_contents_permission_helper.cc @@ -57,7 +57,7 @@ namespace { #if BUILDFLAG(IS_MAC) bool SystemMediaPermissionDenied(const content::MediaStreamRequest& request) { - if (request.audio_type != MediaStreamType::NO_SERVICE) { + if (request.audio_type == MediaStreamType::DEVICE_AUDIO_CAPTURE) { const auto system_audio_permission = system_media_permissions::CheckSystemAudioCapturePermission(); return system_audio_permission == @@ -65,7 +65,7 @@ bool SystemMediaPermissionDenied(const content::MediaStreamRequest& request) { system_audio_permission == system_media_permissions::SystemPermission::kDenied; } - if (request.video_type != MediaStreamType::NO_SERVICE) { + if (request.video_type == MediaStreamType::DEVICE_VIDEO_CAPTURE) { const auto system_video_permission = system_media_permissions::CheckSystemVideoCapturePermission(); return system_video_permission == @@ -73,6 +73,7 @@ bool SystemMediaPermissionDenied(const content::MediaStreamRequest& request) { system_video_permission == system_media_permissions::SystemPermission::kDenied; } + return false; } #endif