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

Unified Diff: remoting/protocol/ssl_hmac_channel_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/ssl_hmac_channel_authenticator_unittest.cc
diff --git a/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc b/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc
index 10fdcf74e73b0af7044dec0166844afe4c562e34..9f3db7e171d089bd11a7cad2fcdec800028c4b0d 100644
--- a/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc
+++ b/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc
@@ -117,10 +117,10 @@ class SslHmacChannelAuthenticatorTest : public testing::Test {
// Verify that a channel can be connected using a valid shared secret.
TEST_F(SslHmacChannelAuthenticatorTest, SuccessfulAuth) {
- client_auth_.reset(SslHmacChannelAuthenticator::CreateForClient(
- host_cert_, kTestSharedSecret));
- host_auth_.reset(SslHmacChannelAuthenticator::CreateForHost(
- host_cert_, private_key_.get(), kTestSharedSecret));
+ client_auth_ = SslHmacChannelAuthenticator::CreateForClient(
+ host_cert_, kTestSharedSecret);
+ host_auth_ = SslHmacChannelAuthenticator::CreateForHost(
+ host_cert_, private_key_.get(), kTestSharedSecret);
RunChannelAuth(false);
@@ -137,10 +137,10 @@ TEST_F(SslHmacChannelAuthenticatorTest, SuccessfulAuth) {
// Verify that channels cannot be using invalid shared secret.
TEST_F(SslHmacChannelAuthenticatorTest, InvalidChannelSecret) {
- client_auth_.reset(SslHmacChannelAuthenticator::CreateForClient(
- host_cert_, kTestSharedSecretBad));
- host_auth_.reset(SslHmacChannelAuthenticator::CreateForHost(
- host_cert_, private_key_.get(), kTestSharedSecret));
+ client_auth_ = SslHmacChannelAuthenticator::CreateForClient(
+ host_cert_, kTestSharedSecretBad);
+ host_auth_ = SslHmacChannelAuthenticator::CreateForHost(
+ host_cert_, private_key_.get(), kTestSharedSecret);
RunChannelAuth(true);

Powered by Google App Engine
This is Rietveld 408576698