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

Unified Diff: device/bluetooth/dbus/bluez_dbus_manager.cc

Issue 1544323002: Convert Pass()→std::move() in //device (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: device/bluetooth/dbus/bluez_dbus_manager.cc
diff --git a/device/bluetooth/dbus/bluez_dbus_manager.cc b/device/bluetooth/dbus/bluez_dbus_manager.cc
index 376261d9dbcf33e7cfc2d1a68d56f9af27c1250f..9736f672fbd64c23cabb8e07c1ae0548e91d843c 100644
--- a/device/bluetooth/dbus/bluez_dbus_manager.cc
+++ b/device/bluetooth/dbus/bluez_dbus_manager.cc
@@ -4,6 +4,8 @@
#include "device/bluetooth/dbus/bluez_dbus_manager.h"
+#include <utility>
+
#include "base/command_line.h"
#include "base/sys_info.h"
#include "base/threading/thread.h"
@@ -30,7 +32,7 @@ static bool g_using_bluez_dbus_manager_for_testing = false;
BluezDBusManager::BluezDBusManager(
dbus::Bus* bus,
scoped_ptr<BluetoothDBusClientBundle> client_bundle)
- : bus_(bus), client_bundle_(client_bundle.Pass()) {}
+ : bus_(bus), client_bundle_(std::move(client_bundle)) {}
BluezDBusManager::~BluezDBusManager() {
// Delete all D-Bus clients before shutting down the system bus.
@@ -177,74 +179,75 @@ BluezDBusManagerSetter::~BluezDBusManagerSetter() {}
void BluezDBusManagerSetter::SetBluetoothAdapterClient(
scoped_ptr<BluetoothAdapterClient> client) {
bluez::BluezDBusManager::Get()->client_bundle_->bluetooth_adapter_client_ =
- client.Pass();
+ std::move(client);
}
void BluezDBusManagerSetter::SetBluetoothLEAdvertisingManagerClient(
scoped_ptr<BluetoothLEAdvertisingManagerClient> client) {
bluez::BluezDBusManager::Get()
->client_bundle_->bluetooth_le_advertising_manager_client_ =
- client.Pass();
+ std::move(client);
}
void BluezDBusManagerSetter::SetBluetoothAgentManagerClient(
scoped_ptr<BluetoothAgentManagerClient> client) {
bluez::BluezDBusManager::Get()
- ->client_bundle_->bluetooth_agent_manager_client_ = client.Pass();
+ ->client_bundle_->bluetooth_agent_manager_client_ = std::move(client);
}
void BluezDBusManagerSetter::SetBluetoothDeviceClient(
scoped_ptr<BluetoothDeviceClient> client) {
bluez::BluezDBusManager::Get()->client_bundle_->bluetooth_device_client_ =
- client.Pass();
+ std::move(client);
}
void BluezDBusManagerSetter::SetBluetoothGattCharacteristicClient(
scoped_ptr<BluetoothGattCharacteristicClient> client) {
bluez::BluezDBusManager::Get()
- ->client_bundle_->bluetooth_gatt_characteristic_client_ = client.Pass();
+ ->client_bundle_->bluetooth_gatt_characteristic_client_ =
+ std::move(client);
}
void BluezDBusManagerSetter::SetBluetoothGattDescriptorClient(
scoped_ptr<BluetoothGattDescriptorClient> client) {
bluez::BluezDBusManager::Get()
- ->client_bundle_->bluetooth_gatt_descriptor_client_ = client.Pass();
+ ->client_bundle_->bluetooth_gatt_descriptor_client_ = std::move(client);
}
void BluezDBusManagerSetter::SetBluetoothGattManagerClient(
scoped_ptr<BluetoothGattManagerClient> client) {
bluez::BluezDBusManager::Get()
- ->client_bundle_->bluetooth_gatt_manager_client_ = client.Pass();
+ ->client_bundle_->bluetooth_gatt_manager_client_ = std::move(client);
}
void BluezDBusManagerSetter::SetBluetoothGattServiceClient(
scoped_ptr<BluetoothGattServiceClient> client) {
bluez::BluezDBusManager::Get()
- ->client_bundle_->bluetooth_gatt_service_client_ = client.Pass();
+ ->client_bundle_->bluetooth_gatt_service_client_ = std::move(client);
}
void BluezDBusManagerSetter::SetBluetoothInputClient(
scoped_ptr<BluetoothInputClient> client) {
bluez::BluezDBusManager::Get()->client_bundle_->bluetooth_input_client_ =
- client.Pass();
+ std::move(client);
}
void BluezDBusManagerSetter::SetBluetoothMediaClient(
scoped_ptr<BluetoothMediaClient> client) {
bluez::BluezDBusManager::Get()->client_bundle_->bluetooth_media_client_ =
- client.Pass();
+ std::move(client);
}
void BluezDBusManagerSetter::SetBluetoothMediaTransportClient(
scoped_ptr<BluetoothMediaTransportClient> client) {
bluez::BluezDBusManager::Get()
- ->client_bundle_->bluetooth_media_transport_client_ = client.Pass();
+ ->client_bundle_->bluetooth_media_transport_client_ = std::move(client);
}
void BluezDBusManagerSetter::SetBluetoothProfileManagerClient(
scoped_ptr<BluetoothProfileManagerClient> client) {
bluez::BluezDBusManager::Get()
- ->client_bundle_->bluetooth_profile_manager_client_ = client.Pass();
+ ->client_bundle_->bluetooth_profile_manager_client_ = std::move(client);
}
} // namespace bluez
« no previous file with comments | « device/bluetooth/dbus/bluetooth_profile_service_provider.cc ('k') | device/bluetooth/dbus/fake_bluetooth_device_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698