Index: device/serial/serial_connection.cc |
diff --git a/device/serial/serial_connection.cc b/device/serial/serial_connection.cc |
index 6830cb39f3253074f6b29e099ea890fec8910030..249b892b244859f7e6b8493ed30028b55179fd0f 100644 |
--- a/device/serial/serial_connection.cc |
+++ b/device/serial/serial_connection.cc |
@@ -4,6 +4,8 @@ |
#include "device/serial/serial_connection.h" |
+#include <utility> |
+ |
#include "base/bind.h" |
#include "device/serial/buffer.h" |
#include "device/serial/data_sink_receiver.h" |
@@ -18,14 +20,14 @@ SerialConnection::SerialConnection( |
mojo::InterfaceRequest<serial::DataSource> source, |
mojo::InterfacePtr<serial::DataSourceClient> source_client, |
mojo::InterfaceRequest<serial::Connection> request) |
- : io_handler_(io_handler), binding_(this, request.Pass()) { |
+ : io_handler_(io_handler), binding_(this, std::move(request)) { |
receiver_ = new DataSinkReceiver( |
- sink.Pass(), |
+ std::move(sink), |
base::Bind(&SerialConnection::OnSendPipeReady, base::Unretained(this)), |
base::Bind(&SerialConnection::OnSendCancelled, base::Unretained(this)), |
base::Bind(base::DoNothing)); |
sender_ = new DataSourceSender( |
- source.Pass(), source_client.Pass(), |
+ std::move(source), std::move(source_client), |
base::Bind(&SerialConnection::OnReceivePipeReady, base::Unretained(this)), |
base::Bind(base::DoNothing)); |
} |
@@ -68,11 +70,11 @@ void SerialConnection::OnSendCancelled(int32_t error) { |
} |
void SerialConnection::OnSendPipeReady(scoped_ptr<ReadOnlyBuffer> buffer) { |
- io_handler_->Write(buffer.Pass()); |
+ io_handler_->Write(std::move(buffer)); |
} |
void SerialConnection::OnReceivePipeReady(scoped_ptr<WritableBuffer> buffer) { |
- io_handler_->Read(buffer.Pass()); |
+ io_handler_->Read(std::move(buffer)); |
} |
} // namespace device |