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

Unified Diff: remoting/host/setup/me2me_native_messaging_host_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: 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/setup/me2me_native_messaging_host_unittest.cc
diff --git a/remoting/host/setup/me2me_native_messaging_host_unittest.cc b/remoting/host/setup/me2me_native_messaging_host_unittest.cc
index e973d7d178a169a79560ce578a9d5d14e8869724..5a97a5fba027271afafa2a9a8029c34b2db29a1e 100644
--- a/remoting/host/setup/me2me_native_messaging_host_unittest.cc
+++ b/remoting/host/setup/me2me_native_messaging_host_unittest.cc
@@ -324,15 +324,15 @@ void Me2MeNativeMessagingHostTest::StartHost() {
make_scoped_ptr(new MockPairingRegistryDelegate()));
scoped_ptr<extensions::NativeMessagingChannel> channel(
- new PipeMessagingChannel(input_read_file.Pass(),
- output_write_file.Pass()));
+ new PipeMessagingChannel(std::move(input_read_file),
+ std::move(output_write_file)));
scoped_ptr<OAuthClient> oauth_client(
new MockOAuthClient("fake_user_email", "fake_refresh_token"));
- host_.reset(new Me2MeNativeMessagingHost(false, 0, channel.Pass(),
+ host_.reset(new Me2MeNativeMessagingHost(false, 0, std::move(channel),
daemon_controller, pairing_registry,
- oauth_client.Pass()));
+ std::move(oauth_client)));
host_->Start(base::Bind(&Me2MeNativeMessagingHostTest::StopHost,
base::Unretained(this)));
@@ -438,7 +438,7 @@ void Me2MeNativeMessagingHostTest::TestBadRequest(const base::Value& message) {
// Read from output pipe, and verify responses.
scoped_ptr<base::DictionaryValue> response = ReadMessageFromOutputPipe();
- VerifyHelloResponse(response.Pass());
+ VerifyHelloResponse(std::move(response));
response = ReadMessageFromOutputPipe();
EXPECT_FALSE(response);
@@ -531,7 +531,7 @@ TEST_F(Me2MeNativeMessagingHostTest, All) {
// Call the verification routine corresponding to the message id.
ASSERT_TRUE(verify_routines[id]);
- verify_routines[id](response.Pass());
+ verify_routines[id](std::move(response));
// Clear the pointer so that the routine cannot be called the second time.
verify_routines[id] = nullptr;

Powered by Google App Engine
This is Rietveld 408576698