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

Unified Diff: device/serial/data_receiver.cc

Issue 1874313002: Convert device to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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/serial/data_receiver.h ('k') | device/serial/data_sink_receiver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/data_receiver.cc
diff --git a/device/serial/data_receiver.cc b/device/serial/data_receiver.cc
index 508667ffd22ec43a8a5d7b7700de97d563095cf5..95f2154039decc37c871d3fa0d4b8c96c706cc09 100644
--- a/device/serial/data_receiver.cc
+++ b/device/serial/data_receiver.cc
@@ -5,6 +5,7 @@
#include "device/serial/data_receiver.h"
#include <limits>
+#include <memory>
#include <utility>
#include "base/bind.h"
@@ -233,9 +234,8 @@ bool DataReceiver::PendingReceive::DispatchDataFrame(
FROM_HERE,
base::Bind(
receive_callback_,
- base::Passed(scoped_ptr<ReadOnlyBuffer>(new Buffer(
- receiver_,
- this,
+ base::Passed(std::unique_ptr<ReadOnlyBuffer>(new Buffer(
+ receiver_, this,
reinterpret_cast<char*>(&data->data[0]) + data->offset,
static_cast<uint32_t>(data->data.size() - data->offset))))));
return false;
« no previous file with comments | « device/serial/data_receiver.h ('k') | device/serial/data_sink_receiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698