| Index: tools/battor_agent/battor_connection_impl.cc
|
| diff --git a/tools/battor_agent/battor_connection_impl.cc b/tools/battor_agent/battor_connection_impl.cc
|
| index 849637bf8dde71fedc214c68684084137b17aa9c..0677ea08155a6b1cb9b824e91479bcb4c80aaf34 100644
|
| --- a/tools/battor_agent/battor_connection_impl.cc
|
| +++ b/tools/battor_agent/battor_connection_impl.cc
|
| @@ -143,8 +143,8 @@ void BattOrConnectionImpl::SendBytes(BattOrMessageType type,
|
| LogSerial(StringPrintf("Bytes sent: %s.", CharVectorToString(data).c_str()));
|
|
|
| pending_write_length_ = data.size();
|
| - io_handler_->Write(base::WrapUnique(new device::SendBuffer(
|
| - data, base::Bind(&BattOrConnectionImpl::OnBytesSent, AsWeakPtr()))));
|
| + io_handler_->Write(base::MakeUnique<device::SendBuffer>(
|
| + data, base::Bind(&BattOrConnectionImpl::OnBytesSent, AsWeakPtr())));
|
| }
|
|
|
| void BattOrConnectionImpl::ReadMessage(BattOrMessageType type) {
|
| @@ -205,9 +205,9 @@ void BattOrConnectionImpl::BeginReadBytes(size_t max_bytes_to_read) {
|
| auto on_receive_buffer_filled =
|
| base::Bind(&BattOrConnectionImpl::OnBytesRead, AsWeakPtr());
|
|
|
| - io_handler_->Read(base::WrapUnique(new device::ReceiveBuffer(
|
| + io_handler_->Read(base::MakeUnique<device::ReceiveBuffer>(
|
| pending_read_buffer_, static_cast<uint32_t>(max_bytes_to_read),
|
| - on_receive_buffer_filled)));
|
| + on_receive_buffer_filled));
|
| }
|
|
|
| void BattOrConnectionImpl::OnBytesRead(int bytes_read,
|
|
|