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

Unified Diff: remoting/protocol/v2_authenticator_unittest.cc

Issue 9240033: Use scoped_ptr<>.Pass() to pass ownership in the remoting protocol code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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/protocol/v2_authenticator_unittest.cc
diff --git a/remoting/protocol/v2_authenticator_unittest.cc b/remoting/protocol/v2_authenticator_unittest.cc
index 812ee1dfe32d24caadf4aaa7eeed5558baadb351..13bb2ecf16a86a5ed044a400067d3c7016aa4c15 100644
--- a/remoting/protocol/v2_authenticator_unittest.cc
+++ b/remoting/protocol/v2_authenticator_unittest.cc
@@ -86,7 +86,7 @@ class V2AuthenticatorTest : public testing::Test {
// Pass message from client to host.
ASSERT_EQ(Authenticator::MESSAGE_READY, client_->state());
- message.reset(client_->GetNextMessage());
+ message = client_->GetNextMessage();
ASSERT_TRUE(message.get());
ASSERT_NE(Authenticator::MESSAGE_READY, client_->state());
@@ -102,7 +102,7 @@ class V2AuthenticatorTest : public testing::Test {
// Pass message from host to client.
ASSERT_EQ(Authenticator::MESSAGE_READY, host_->state());
- message.reset(host_->GetNextMessage());
+ message = host_->GetNextMessage();
ASSERT_TRUE(message.get());
ASSERT_NE(Authenticator::MESSAGE_READY, host_->state());
@@ -172,8 +172,8 @@ TEST_F(V2AuthenticatorTest, SuccessfulAuth) {
ASSERT_EQ(Authenticator::ACCEPTED, host_->state());
ASSERT_EQ(Authenticator::ACCEPTED, client_->state());
- client_auth_.reset(client_->CreateChannelAuthenticator());
- host_auth_.reset(host_->CreateChannelAuthenticator());
+ client_auth_ = client_->CreateChannelAuthenticator();
+ host_auth_ = host_->CreateChannelAuthenticator();
RunChannelAuth(false);
EXPECT_TRUE(client_socket_.get() != NULL);
« remoting/protocol/v2_authenticator.cc ('K') | « remoting/protocol/v2_authenticator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698