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

Unified Diff: remoting/host/native_messaging/native_messaging_writer_unittest.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU 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
Index: remoting/host/native_messaging/native_messaging_writer_unittest.cc
diff --git a/remoting/host/native_messaging/native_messaging_writer_unittest.cc b/remoting/host/native_messaging/native_messaging_writer_unittest.cc
index def0a757365681a746b6e61e2110d0e6139d6101..37963c06734b88e86d3a30080932f2df09364d47 100644
--- a/remoting/host/native_messaging/native_messaging_writer_unittest.cc
+++ b/remoting/host/native_messaging/native_messaging_writer_unittest.cc
@@ -6,10 +6,10 @@
#include <stdint.h>
+#include <memory>
#include <utility>
#include "base/json/json_reader.h"
-#include "base/memory/scoped_ptr.h"
#include "base/stl_util.h"
#include "base/values.h"
#include "remoting/host/setup/test_util.h"
@@ -25,7 +25,7 @@ class NativeMessagingWriterTest : public testing::Test {
void SetUp() override;
protected:
- scoped_ptr<NativeMessagingWriter> writer_;
+ std::unique_ptr<NativeMessagingWriter> writer_;
base::File read_file_;
base::File write_file_;
};
@@ -52,7 +52,8 @@ TEST_F(NativeMessagingWriterTest, GoodMessage) {
EXPECT_EQ(static_cast<int>(length), read);
// |content| should now contain serialized |message|.
- scoped_ptr<base::Value> written_message = base::JSONReader::Read(content);
+ std::unique_ptr<base::Value> written_message =
+ base::JSONReader::Read(content);
EXPECT_TRUE(message.Equals(written_message.get()));
// Nothing more should have been written. Close the write-end of the pipe,
@@ -84,7 +85,8 @@ TEST_F(NativeMessagingWriterTest, SecondMessage) {
}
// |content| should now contain serialized |message2|.
- scoped_ptr<base::Value> written_message2 = base::JSONReader::Read(content);
+ std::unique_ptr<base::Value> written_message2 =
+ base::JSONReader::Read(content);
EXPECT_TRUE(message2.Equals(written_message2.get()));
}

Powered by Google App Engine
This is Rietveld 408576698