| Index: remoting/protocol/fake_authenticator.cc
|
| diff --git a/remoting/protocol/fake_authenticator.cc b/remoting/protocol/fake_authenticator.cc
|
| index 559122125a910853a1e43c884a91fe6bc65bdeee..87ca0965311ce509c09203288c0eba63b10cdc04 100644
|
| --- a/remoting/protocol/fake_authenticator.cc
|
| +++ b/remoting/protocol/fake_authenticator.cc
|
| @@ -97,24 +97,25 @@ void FakeAuthenticator::ProcessMessage(const buzz::XmlElement* message) {
|
| ++messages_;
|
| }
|
|
|
| -buzz::XmlElement* FakeAuthenticator::GetNextMessage() {
|
| +scoped_ptr<buzz::XmlElement> FakeAuthenticator::GetNextMessage() {
|
| EXPECT_EQ(MESSAGE_READY, state());
|
|
|
| - buzz::XmlElement* result = new buzz::XmlElement(
|
| - buzz::QName(kChromotingXmlNamespace, "authentication"));
|
| + scoped_ptr<buzz::XmlElement> result(new buzz::XmlElement(
|
| + buzz::QName(kChromotingXmlNamespace, "authentication")));
|
| buzz::XmlElement* id = new buzz::XmlElement(
|
| buzz::QName(kChromotingXmlNamespace, "id"));
|
| id->AddText(base::IntToString(messages_));
|
| result->AddElement(id);
|
|
|
| ++messages_;
|
| - return result;
|
| + return result.Pass();
|
| }
|
|
|
| -ChannelAuthenticator*
|
| +scoped_ptr<ChannelAuthenticator>
|
| FakeAuthenticator::CreateChannelAuthenticator() const {
|
| EXPECT_EQ(ACCEPTED, state());
|
| - return new FakeChannelAuthenticator(action_ != REJECT_CHANNEL, async_);
|
| + return scoped_ptr<ChannelAuthenticator>(
|
| + new FakeChannelAuthenticator(action_ != REJECT_CHANNEL, async_));
|
| }
|
|
|
| FakeHostAuthenticatorFactory::FakeHostAuthenticatorFactory(
|
|
|