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

Unified Diff: device/serial/data_receiver.h

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/nfc/nfc_tag_chromeos.h ('k') | device/serial/data_receiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/data_receiver.h
diff --git a/device/serial/data_receiver.h b/device/serial/data_receiver.h
index 7393517f47c86aed5d3f0d60013e117c5ae3a617..be1dc828a4ebae2c621a56384d50c6cd425182b5 100644
--- a/device/serial/data_receiver.h
+++ b/device/serial/data_receiver.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <memory>
#include <queue>
#include "base/callback.h"
@@ -25,7 +26,8 @@ namespace device {
class DataReceiver : public base::RefCounted<DataReceiver>,
public serial::DataSourceClient {
public:
- typedef base::Callback<void(scoped_ptr<ReadOnlyBuffer>)> ReceiveDataCallback;
+ typedef base::Callback<void(std::unique_ptr<ReadOnlyBuffer>)>
+ ReceiveDataCallback;
typedef base::Callback<void(int32_t error)> ReceiveErrorCallback;
// Constructs a DataReceiver to receive data from |source|, using a buffer
@@ -85,7 +87,7 @@ class DataReceiver : public base::RefCounted<DataReceiver>,
bool shut_down_;
// The current pending receive operation if there is one.
- scoped_ptr<PendingReceive> pending_receive_;
+ std::unique_ptr<PendingReceive> pending_receive_;
// The queue of pending data frames (data or an error) received from the
// DataSource.
« no previous file with comments | « device/nfc/nfc_tag_chromeos.h ('k') | device/serial/data_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698