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

Unified Diff: remoting/protocol/pepper_session_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/pepper_session_unittest.cc
diff --git a/remoting/protocol/pepper_session_unittest.cc b/remoting/protocol/pepper_session_unittest.cc
index bec6e9534eebe47f1380e9b10370b9c1911a3db0..134f28f18487ba112d758b857c76434f2128f6bd 100644
--- a/remoting/protocol/pepper_session_unittest.cc
+++ b/remoting/protocol/pepper_session_unittest.cc
@@ -178,14 +178,14 @@ class PepperSessionTest : public testing::Test {
}
}
- Authenticator* authenticator = new FakeAuthenticator(
- FakeAuthenticator::CLIENT, auth_round_trips, auth_action, true);
+ scoped_ptr<Authenticator> authenticator(new FakeAuthenticator(
+ FakeAuthenticator::CLIENT, auth_round_trips, auth_action, true));
- client_session_.reset(client_server_->Connect(
- kHostJid, authenticator,
+ client_session_ = client_server_->Connect(
+ kHostJid, authenticator.Pass(),
CandidateSessionConfig::CreateDefault(),
base::Bind(&MockSessionCallback::OnStateChange,
- base::Unretained(&client_connection_callback_))));
+ base::Unretained(&client_connection_callback_)));
message_loop_.RunAllPending();
}
@@ -233,13 +233,12 @@ TEST_F(PepperSessionTest, RejectConnection) {
.Times(1);
}
- Authenticator* authenticator = new FakeAuthenticator(
- FakeAuthenticator::CLIENT, 1, FakeAuthenticator::ACCEPT, true);
- client_session_.reset(client_server_->Connect(
- kHostJid, authenticator,
- CandidateSessionConfig::CreateDefault(),
+ scoped_ptr<Authenticator> authenticator(new FakeAuthenticator(
+ FakeAuthenticator::CLIENT, 1, FakeAuthenticator::ACCEPT, true));
+ client_session_ = client_server_->Connect(
+ kHostJid, authenticator.Pass(), CandidateSessionConfig::CreateDefault(),
base::Bind(&MockSessionCallback::OnStateChange,
- base::Unretained(&client_connection_callback_))));
+ base::Unretained(&client_connection_callback_)));
message_loop_.RunAllPending();
}

Powered by Google App Engine
This is Rietveld 408576698