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

Unified Diff: remoting/protocol/it2me_host_authenticator_factory.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/it2me_host_authenticator_factory.cc
diff --git a/remoting/protocol/it2me_host_authenticator_factory.cc b/remoting/protocol/it2me_host_authenticator_factory.cc
index 21809de0402bf186273feac10f285c90ab49da8d..64c928c3b84b016d7efedf15d9814e7eea81bf8e 100644
--- a/remoting/protocol/it2me_host_authenticator_factory.cc
+++ b/remoting/protocol/it2me_host_authenticator_factory.cc
@@ -24,7 +24,7 @@ It2MeHostAuthenticatorFactory::It2MeHostAuthenticatorFactory(
It2MeHostAuthenticatorFactory::~It2MeHostAuthenticatorFactory() {
}
-Authenticator* It2MeHostAuthenticatorFactory::CreateAuthenticator(
+scoped_ptr<Authenticator> It2MeHostAuthenticatorFactory::CreateAuthenticator(
const std::string& remote_jid,
const buzz::XmlElement* first_message) {
// TODO(sergeyu): V2 authenticator is not finished yet. Enable it
@@ -35,8 +35,8 @@ Authenticator* It2MeHostAuthenticatorFactory::CreateAuthenticator(
// local_cert_, *local_private_key_, shared_secret_);
// }
- return new V1HostAuthenticator(local_cert_, *local_private_key_,
- shared_secret_, remote_jid);
+ return scoped_ptr<Authenticator>(new V1HostAuthenticator(
+ local_cert_, *local_private_key_, shared_secret_, remote_jid));
}
} // namespace protocol

Powered by Google App Engine
This is Rietveld 408576698