chore: eliminate a few uses of base::AdaptCallbackForRepeating() (#38293)

This commit is contained in:
Milan Burda 2023-05-18 23:01:44 +02:00 committed by GitHub
parent 642950a00e
commit 2acb97aa85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 16 deletions

View file

@ -156,11 +156,10 @@ void SerialChooserController::OnGetDevices(
bool prevent_default = false;
api::Session* session = GetSession();
if (session) {
prevent_default =
session->Emit("select-serial-port", ports_, web_contents(),
base::AdaptCallbackForRepeating(base::BindOnce(
&SerialChooserController::OnDeviceChosen,
weak_factory_.GetWeakPtr())));
prevent_default = session->Emit(
"select-serial-port", ports_, web_contents(),
base::BindRepeating(&SerialChooserController::OnDeviceChosen,
weak_factory_.GetWeakPtr()));
}
if (!prevent_default) {
RunCallback(/*port=*/nullptr);