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

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

Issue 1549493004: Use std::move() instead of .Pass() in remoting/host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass
Patch Set: include <utility> Created 5 years 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_reader_unittest.cc
diff --git a/remoting/host/native_messaging/native_messaging_reader_unittest.cc b/remoting/host/native_messaging/native_messaging_reader_unittest.cc
index 8c076b4919041a7ca52178dd2c1f6432486aa1b6..73ff362ad71a0cec286e0681f5ff2ecf29e38b86 100644
--- a/remoting/host/native_messaging/native_messaging_reader_unittest.cc
+++ b/remoting/host/native_messaging/native_messaging_reader_unittest.cc
@@ -6,6 +6,8 @@
#include <stdint.h>
+#include <utility>
+
#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
@@ -49,14 +51,12 @@ class NativeMessagingReaderTest : public testing::Test {
base::RunLoop run_loop_;
};
-NativeMessagingReaderTest::NativeMessagingReaderTest() {
-}
-
+NativeMessagingReaderTest::NativeMessagingReaderTest() {}
NativeMessagingReaderTest::~NativeMessagingReaderTest() {}
void NativeMessagingReaderTest::SetUp() {
ASSERT_TRUE(MakePipe(&read_file_, &write_file_));
- reader_.reset(new NativeMessagingReader(read_file_.Pass()));
+ reader_.reset(new NativeMessagingReader(std::move(read_file_)));
}
void NativeMessagingReaderTest::Run() {
@@ -72,7 +72,7 @@ void NativeMessagingReaderTest::Run() {
}
void NativeMessagingReaderTest::OnMessage(scoped_ptr<base::Value> message) {
- message_ = message.Pass();
+ message_ = std::move(message);
}
void NativeMessagingReaderTest::WriteMessage(const std::string& message) {
« no previous file with comments | « remoting/host/native_messaging/native_messaging_reader.cc ('k') | remoting/host/native_messaging/native_messaging_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698