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

Unified Diff: mojo/public/cpp/bindings/tests/validation_unittest.cc

Issue 1535943002: Convert Pass()→std::move() in //mojo/public/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove self-move checks to avoid triggering clang warning. 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: mojo/public/cpp/bindings/tests/validation_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/validation_unittest.cc b/mojo/public/cpp/bindings/tests/validation_unittest.cc
index 7153a59ae9e301c63b6352717897189ec1a9b831..d21a73f8f99a75507bb6f7ab90548b903e4210f9 100644
--- a/mojo/public/cpp/bindings/tests/validation_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/validation_unittest.cc
@@ -3,9 +3,9 @@
// found in the LICENSE file.
#include <stdio.h>
-
#include <algorithm>
#include <string>
+#include <utility>
#include <vector>
#include "base/message_loop/message_loop.h"
@@ -202,7 +202,7 @@ class ValidationIntegrationTest : public ValidationTest {
ASSERT_EQ(MOJO_RESULT_OK,
CreateMessagePipe(nullptr, &tester_endpoint, &testee_endpoint_));
test_message_receiver_ =
- new TestMessageReceiver(this, tester_endpoint.Pass());
+ new TestMessageReceiver(this, std::move(tester_endpoint));
}
void TearDown() override {
@@ -216,7 +216,9 @@ class ValidationIntegrationTest : public ValidationTest {
MessageReceiver* test_message_receiver() { return test_message_receiver_; }
- ScopedMessagePipeHandle testee_endpoint() { return testee_endpoint_.Pass(); }
+ ScopedMessagePipeHandle testee_endpoint() {
+ return std::move(testee_endpoint_);
+ }
private:
class TestMessageReceiver : public MessageReceiver {
@@ -224,7 +226,7 @@ class ValidationIntegrationTest : public ValidationTest {
TestMessageReceiver(ValidationIntegrationTest* owner,
ScopedMessagePipeHandle handle)
: owner_(owner),
- connector_(handle.Pass(),
+ connector_(std::move(handle),
mojo::internal::Connector::SINGLE_THREADED_SEND) {
connector_.set_enforce_errors_from_incoming_receiver(false);
}
@@ -418,7 +420,7 @@ TEST_F(ValidationTest, ResponseBoundsCheck) {
// - X::ResponseValidator_
TEST_F(ValidationIntegrationTest, InterfacePtr) {
IntegrationTestInterfacePtr interface_ptr = MakeProxy(
- InterfacePtrInfo<IntegrationTestInterface>(testee_endpoint().Pass(), 0u));
+ InterfacePtrInfo<IntegrationTestInterface>(testee_endpoint(), 0u));
interface_ptr.internal_state()->EnableTestingMode();
RunValidationTests("integration_intf_resp", test_message_receiver());
@@ -433,7 +435,7 @@ TEST_F(ValidationIntegrationTest, Binding) {
IntegrationTestInterfaceImpl interface_impl;
Binding<IntegrationTestInterface> binding(
&interface_impl,
- MakeRequest<IntegrationTestInterface>(testee_endpoint().Pass()));
+ MakeRequest<IntegrationTestInterface>(testee_endpoint()));
binding.EnableTestingMode();
RunValidationTests("integration_intf_rqst", test_message_receiver());

Powered by Google App Engine
This is Rietveld 408576698