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

Unified Diff: device/serial/data_sink_unittest.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_sink_receiver.cc ('k') | device/serial/data_source_sender.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/data_sink_unittest.cc
diff --git a/device/serial/data_sink_unittest.cc b/device/serial/data_sink_unittest.cc
index 54067dc220463018f8d1805bfa4850b97d1440ba..10dcc72ddacb1b10616fa9d9fc456342d768794c 100644
--- a/device/serial/data_sink_unittest.cc
+++ b/device/serial/data_sink_unittest.cc
@@ -4,6 +4,8 @@
#include <stddef.h>
#include <stdint.h>
+
+#include <memory>
#include <utility>
#include "base/bind.h"
@@ -158,7 +160,7 @@ class DataSinkTest : public testing::Test {
EventReceived(EVENT_SEND_ERROR);
}
- void OnDataToRead(scoped_ptr<ReadOnlyBuffer> buffer) {
+ void OnDataToRead(std::unique_ptr<ReadOnlyBuffer> buffer) {
read_buffer_ = std::move(buffer);
read_buffer_contents_ =
std::string(read_buffer_->GetData(), read_buffer_->GetSize());
@@ -180,17 +182,17 @@ class DataSinkTest : public testing::Test {
protected:
static const int32_t kFatalError;
static const uint32_t kBufferSize;
- scoped_ptr<base::MessageLoop> message_loop_;
+ std::unique_ptr<base::MessageLoop> message_loop_;
base::Closure stop_run_loop_;
scoped_refptr<DataSinkReceiver> sink_receiver_;
- scoped_ptr<DataSender> sender_;
+ std::unique_ptr<DataSender> sender_;
uint32_t bytes_sent_;
int32_t send_error_;
bool has_send_error_;
int32_t cancel_error_;
- scoped_ptr<ReadOnlyBuffer> read_buffer_;
+ std::unique_ptr<ReadOnlyBuffer> read_buffer_;
std::string read_buffer_contents_;
bool seen_connection_error_;
« no previous file with comments | « device/serial/data_sink_receiver.cc ('k') | device/serial/data_source_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698