Skip to content

Commit

Permalink
Switch to new RequestPermissionsFromCurrentDocument API method for Me…
Browse files Browse the repository at this point in the history
…dia Stream Devices

Switch away from the deprecated RequestPermissions() API, as a part of removing a bug where the previously provided request.security_origin param might get destroyed during the method execution.

Bug: 1283402
Change-Id: I512ce910146ec60d4d35fa1a86a71a3b0983a5d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3417436
Reviewed-by: Florent Castelli <orphis@chromium.org>
Commit-Queue: Tony Herre <toprice@chromium.org>
Cr-Commit-Position: refs/heads/main@{#964535}
  • Loading branch information
Tony Herre authored and Chromium LUCI CQ committed Jan 28, 2022
1 parent 0723717 commit cb6778f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions components/webrtc/media_stream_devices_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,8 @@ void MediaStreamDevicesController::RequestPermissions(
}
}

permission_manager->RequestPermissions(
content_settings_types, rfh, request.security_origin,
request.user_gesture,
permission_manager->RequestPermissionsFromCurrentDocument(
content_settings_types, rfh, request.user_gesture,
base::BindOnce(
&MediaStreamDevicesController::RequestAndroidPermissionsIfNeeded,
web_contents, std::move(controller), will_prompt_for_audio,
Expand Down

0 comments on commit cb6778f

Please sign in to comment.