chore: eliminate a few uses of base::AdaptCallbackForRepeating() (#38293)
This commit is contained in:
parent
642950a00e
commit
2acb97aa85
5 changed files with 12 additions and 16 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue