Chromium Code Reviews| Index: remoting/protocol/v2_authenticator.cc |
| diff --git a/remoting/protocol/v2_authenticator.cc b/remoting/protocol/v2_authenticator.cc |
| index edfc1cefd724211c83bfa579184570feec930d99..8ca1cb8df19afa44210d02b9d50fd7a62480c271 100644 |
| --- a/remoting/protocol/v2_authenticator.cc |
| +++ b/remoting/protocol/v2_authenticator.cc |
| @@ -129,10 +129,10 @@ void V2Authenticator::ProcessMessage(const buzz::XmlElement* message) { |
| state_ = MESSAGE_READY; |
| } |
| -buzz::XmlElement* V2Authenticator::GetNextMessage() { |
| +scoped_ptr<buzz::XmlElement> V2Authenticator::GetNextMessage() { |
| DCHECK_EQ(state(), MESSAGE_READY); |
| - buzz::XmlElement* message = CreateEmptyAuthenticatorMessage(); |
| + scoped_ptr<buzz::XmlElement> message = CreateEmptyAuthenticatorMessage(); |
| DCHECK(!pending_messages_.empty()); |
| while (!pending_messages_.empty()) { |
| @@ -163,19 +163,22 @@ buzz::XmlElement* V2Authenticator::GetNextMessage() { |
| if (state_ != ACCEPTED) { |
| state_ = WAITING_MESSAGE; |
| } |
| - return message; |
| + return message.Pass(); |
| } |
| -ChannelAuthenticator* V2Authenticator::CreateChannelAuthenticator() const { |
| +scoped_ptr<ChannelAuthenticator> |
| +V2Authenticator::CreateChannelAuthenticator() const { |
| DCHECK_EQ(state(), ACCEPTED); |
| CHECK(!auth_key_.empty()); |
| if (is_host_side()) { |
| - return SslHmacChannelAuthenticator::CreateForHost( |
| - local_cert_, local_private_key_.get(), auth_key_); |
| + return scoped_ptr<ChannelAuthenticator>( |
| + SslHmacChannelAuthenticator::CreateForHost( |
| + local_cert_, local_private_key_.get(), auth_key_).release()); |
|
Wez
2012/01/19 03:18:17
.Pass()?
Sergey Ulanov
2012/01/19 20:11:42
Done.
|
| } else { |
| - return SslHmacChannelAuthenticator::CreateForClient( |
| - remote_cert_, auth_key_); |
| + return scoped_ptr<ChannelAuthenticator>( |
| + SslHmacChannelAuthenticator::CreateForClient( |
| + remote_cert_, auth_key_).release()); |
|
Wez
2012/01/19 03:18:17
.Pass()?
Sergey Ulanov
2012/01/19 20:11:42
Done.
|
| } |
| } |