Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(590)

Unified Diff: components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc
diff --git a/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc b/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc
index bf50796f069ad705d4814d4420bdb370335b7beb..90fbf5f894fec1484967189f004e03f05ad53c65 100644
--- a/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc
+++ b/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc
@@ -5,6 +5,7 @@
#include "components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h"
#include <string>
+#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -210,7 +211,7 @@ void BluetoothLowEnergyConnectionFinder::OnAdapterInitialized(
void BluetoothLowEnergyConnectionFinder::OnDiscoverySessionStarted(
scoped_ptr<device::BluetoothDiscoverySession> discovery_session) {
PA_LOG(INFO) << "Discovery session started";
- discovery_session_ = discovery_session.Pass();
+ discovery_session_ = std::move(discovery_session);
}
void BluetoothLowEnergyConnectionFinder::OnStartDiscoverySessionError() {
@@ -230,7 +231,7 @@ void BluetoothLowEnergyConnectionFinder::StartDiscoverySession() {
filter->SetRSSI(kMinDiscoveryRSSI);
adapter_->StartDiscoverySessionWithFilter(
- filter.Pass(),
+ std::move(filter),
base::Bind(&BluetoothLowEnergyConnectionFinder::OnDiscoverySessionStarted,
weak_ptr_factory_.GetWeakPtr()),
base::Bind(
@@ -310,7 +311,7 @@ BluetoothDevice* BluetoothLowEnergyConnectionFinder::GetDevice(
}
void BluetoothLowEnergyConnectionFinder::InvokeCallbackAsync() {
- connection_callback_.Run(connection_.Pass());
+ connection_callback_.Run(std::move(connection_));
}
} // namespace proximity_auth

Powered by Google App Engine
This is Rietveld 408576698