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

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: 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
« no previous file with comments | « remoting/host/setup/me2me_native_messaging_host_main.cc ('k') | remoting/host/shaped_desktop_capturer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 31a261de3797c7941a55ef91a6da4bd252f9f339..4e0553a7e37f4578b4c53b87804f695a2a5987cf 100644
--- a/remoting/host/setup/me2me_native_messaging_host_unittest.cc
+++ b/remoting/host/setup/me2me_native_messaging_host_unittest.cc
@@ -7,6 +7,8 @@
#include <stddef.h>
#include <stdint.h>
+#include <utility>
+
#include "base/compiler_specific.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
@@ -327,15 +329,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)));
@@ -441,7 +443,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);
@@ -534,7 +536,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;
« no previous file with comments | « remoting/host/setup/me2me_native_messaging_host_main.cc ('k') | remoting/host/shaped_desktop_capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698