chore: convert session base::Bind instances (#18038)

Convert instances of base::Bind to base::BindOnce and base::BindRepeating as applicable in the session module as well as in Autofill popups.
This commit is contained in:
Shelley Vohr 2019-05-01 13:45:08 -07:00 committed by GitHub
parent 61effac72a
commit f316c8470c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 25 deletions

View file

@ -93,8 +93,8 @@ void AutofillPopupView::Show() {
if (initialize_widget)
views::WidgetFocusManager::GetInstance()->AddFocusChangeListener(this);
keypress_callback_ = base::Bind(&AutofillPopupView::HandleKeyPressEvent,
base::Unretained(this));
keypress_callback_ = base::BindRepeating(
&AutofillPopupView::HandleKeyPressEvent, base::Unretained(this));
auto* host = popup_->frame_host_->GetRenderViewHost()->GetWidget();
host->AddKeyPressEventCallback(keypress_callback_);
@ -294,8 +294,8 @@ void AutofillPopupView::OnMouseExited(const ui::MouseEvent& event) {
// OnMouseExited event. Pressing return should activate the current selection
// via AcceleratorPressed, so we need to let that run first.
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&AutofillPopupView::ClearSelection,
weak_ptr_factory_.GetWeakPtr()));
FROM_HERE, base::BindOnce(&AutofillPopupView::ClearSelection,
weak_ptr_factory_.GetWeakPtr()));
}
void AutofillPopupView::OnMouseMoved(const ui::MouseEvent& event) {