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

Unified Diff: device/bluetooth/bluetooth_socket_mac.mm

Issue 1579863003: Convert Pass()→std::move() for Mac build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months 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
« no previous file with comments | « device/bluetooth/bluetooth_rfcomm_channel_mac.mm ('k') | device/serial/serial_device_enumerator_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_socket_mac.mm
diff --git a/device/bluetooth/bluetooth_socket_mac.mm b/device/bluetooth/bluetooth_socket_mac.mm
index 0157d10f83db28b2279b986f5e82c19383ee9492..c82e5d2ba8ea5de1fad6566bcccf79db71ef3d94 100644
--- a/device/bluetooth/bluetooth_socket_mac.mm
+++ b/device/bluetooth/bluetooth_socket_mac.mm
@@ -10,6 +10,7 @@
#include <limits>
#include <sstream>
#include <string>
+#include <utility>
#include "base/bind.h"
#include "base/callback.h"
@@ -648,7 +649,7 @@ void BluetoothSocketMac::OnChannelOpenComplete(
DVLOG(1) << device_address << " " << uuid_.canonical_value()
<< ": channel open complete.";
- scoped_ptr<ConnectCallbacks> temp = connect_callbacks_.Pass();
+ scoped_ptr<ConnectCallbacks> temp = std::move(connect_callbacks_);
if (status != kIOReturnSuccess) {
ReleaseChannel();
std::stringstream error;
@@ -724,7 +725,7 @@ void BluetoothSocketMac::OnChannelDataReceived(void* data, size_t length) {
// If there is a pending read callback, call it now.
if (receive_callbacks_) {
- scoped_ptr<ReceiveCallbacks> temp = receive_callbacks_.Pass();
+ scoped_ptr<ReceiveCallbacks> temp = std::move(receive_callbacks_);
temp->success_callback.Run(buffer->size(), buffer);
return;
}
@@ -834,7 +835,7 @@ void BluetoothSocketMac::OnChannelClosed() {
DCHECK(thread_checker_.CalledOnValidThread());
if (receive_callbacks_) {
- scoped_ptr<ReceiveCallbacks> temp = receive_callbacks_.Pass();
+ scoped_ptr<ReceiveCallbacks> temp = std::move(receive_callbacks_);
temp->error_callback.Run(BluetoothSocket::kDisconnected,
kSocketNotConnected);
}
« no previous file with comments | « device/bluetooth/bluetooth_rfcomm_channel_mac.mm ('k') | device/serial/serial_device_enumerator_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698