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

Unified Diff: device/serial/data_source_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_source_sender.cc ('k') | device/serial/serial_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/data_source_unittest.cc
diff --git a/device/serial/data_source_unittest.cc b/device/serial/data_source_unittest.cc
index 7dacbedfdb21be61c54a895d38f77ef4d7f50688..409cf6213fa5bba51115f685ce22614f1f1d3a51 100644
--- a/device/serial/data_source_unittest.cc
+++ b/device/serial/data_source_unittest.cc
@@ -3,6 +3,8 @@
// found in the LICENSE file.
#include <stdint.h>
+
+#include <memory>
#include <utility>
#include "base/bind.h"
@@ -98,7 +100,7 @@ class DataSourceTest : public testing::Test {
WaitForEvent(EVENT_RECEIVE_COMPLETE);
}
- void OnDataReceived(scoped_ptr<ReadOnlyBuffer> buffer) {
+ void OnDataReceived(std::unique_ptr<ReadOnlyBuffer> buffer) {
ASSERT_TRUE(buffer);
error_ = 0;
buffer_ = std::move(buffer);
@@ -112,23 +114,23 @@ class DataSourceTest : public testing::Test {
EventReceived(EVENT_RECEIVE_COMPLETE);
}
- void CanWriteData(scoped_ptr<WritableBuffer> buffer) {
+ void CanWriteData(std::unique_ptr<WritableBuffer> buffer) {
write_buffer_ = std::move(buffer);
EventReceived(EVENT_WRITE_BUFFER_READY);
}
protected:
static const int32_t kFatalError;
- scoped_ptr<base::MessageLoop> message_loop_;
+ std::unique_ptr<base::MessageLoop> message_loop_;
base::Closure stop_run_loop_;
scoped_refptr<DataSourceSender> source_sender_;
scoped_refptr<DataReceiver> receiver_;
- scoped_ptr<ReadOnlyBuffer> buffer_;
+ std::unique_ptr<ReadOnlyBuffer> buffer_;
std::string buffer_contents_;
int32_t error_;
- scoped_ptr<WritableBuffer> write_buffer_;
+ std::unique_ptr<WritableBuffer> write_buffer_;
bool seen_connection_error_;
« no previous file with comments | « device/serial/data_source_sender.cc ('k') | device/serial/serial_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698