Commit 5fae9add authored by Makoto Shimazu's avatar Makoto Shimazu Committed by Commit Bot

Convert base::Bind to base::Bind{Once,Repeating} in content/browser

This CL converts base::Bind to BindOnce or BindRepeating, and also changes
relevant base::Callbacks or base::Closures to appropriate types.

This CL is split from https://crrev.com/1831621.

This CL was uploaded by git cl split.

R=reillyg@chromium.org

Bug: 1007760
Change-Id: I915acf6516bd67d6c244dfb2fd6688df7717ace6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1849534
Auto-Submit: Makoto Shimazu <shimazu@chromium.org>
Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704441}
parent 43f6a0e0
...@@ -235,10 +235,11 @@ BluetoothDeviceChooserController::BluetoothDeviceChooserController( ...@@ -235,10 +235,11 @@ BluetoothDeviceChooserController::BluetoothDeviceChooserController(
discovery_session_timer_( discovery_session_timer_(
FROM_HERE, FROM_HERE,
base::TimeDelta::FromSeconds(scan_duration_), base::TimeDelta::FromSeconds(scan_duration_),
base::Bind(&BluetoothDeviceChooserController::StopDeviceDiscovery, base::BindRepeating(
// base::Timer guarantees it won't call back after its &BluetoothDeviceChooserController::StopDeviceDiscovery,
// destructor starts. // base::Timer guarantees it won't call back after its
base::Unretained(this))) { // destructor starts.
base::Unretained(this))) {
CHECK(adapter_); CHECK(adapter_);
} }
...@@ -313,9 +314,9 @@ void BluetoothDeviceChooserController::GetDevice( ...@@ -313,9 +314,9 @@ void BluetoothDeviceChooserController::GetDevice(
return; return;
} }
BluetoothChooser::EventHandler chooser_event_handler = BluetoothChooser::EventHandler chooser_event_handler = base::BindRepeating(
base::Bind(&BluetoothDeviceChooserController::OnBluetoothChooserEvent, &BluetoothDeviceChooserController::OnBluetoothChooserEvent,
base::Unretained(this)); base::Unretained(this));
if (WebContentsDelegate* delegate = web_contents_->GetDelegate()) { if (WebContentsDelegate* delegate = web_contents_->GetDelegate()) {
chooser_ = delegate->RunBluetoothChooser(render_frame_host_, chooser_ = delegate->RunBluetoothChooser(render_frame_host_,
......
...@@ -28,9 +28,10 @@ BluetoothDeviceScanningPromptController:: ...@@ -28,9 +28,10 @@ BluetoothDeviceScanningPromptController::
} }
void BluetoothDeviceScanningPromptController::ShowPermissionPrompt() { void BluetoothDeviceScanningPromptController::ShowPermissionPrompt() {
BluetoothScanningPrompt::EventHandler prompt_event_handler = base::Bind( BluetoothScanningPrompt::EventHandler prompt_event_handler =
&BluetoothDeviceScanningPromptController::OnBluetoothScanningPromptEvent, base::BindRepeating(&BluetoothDeviceScanningPromptController::
base::Unretained(this)); OnBluetoothScanningPromptEvent,
base::Unretained(this));
WebContentsDelegate* delegate = WebContentsDelegate* delegate =
WebContents::FromRenderFrameHost(render_frame_host_)->GetDelegate(); WebContents::FromRenderFrameHost(render_frame_host_)->GetDelegate();
if (delegate) { if (delegate) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment