From 5bf5231373631d2ed940ad9eb03da77132411f57 Mon Sep 17 00:00:00 2001 From: "sergeyu@chromium.org" Date: Fri, 20 Jan 2012 04:10:52 +0000 Subject: Use scoped_ptr<>.Pass() to pass ownership in the remoting protocol code. Review URL: https://chromiumcodereview.appspot.com/9240033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118407 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/protocol/content_description.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'remoting/protocol/content_description.cc') diff --git a/remoting/protocol/content_description.cc b/remoting/protocol/content_description.cc index 15583b0..5e157ad 100644 --- a/remoting/protocol/content_description.cc +++ b/remoting/protocol/content_description.cc @@ -146,10 +146,10 @@ bool ParseChannelConfig(const XmlElement* element, bool codec_required, } // namespace ContentDescription::ContentDescription( - const CandidateSessionConfig* candidate_config, - const buzz::XmlElement* authenticator_message) - : candidate_config_(candidate_config), - authenticator_message_(authenticator_message) { + scoped_ptr config, + scoped_ptr authenticator_message) + : candidate_config_(config.Pass()), + authenticator_message_(authenticator_message.Pass()) { } ContentDescription::~ContentDescription() { } @@ -247,8 +247,7 @@ ContentDescription* ContentDescription::ParseXml( if (child) authenticator_message.reset(new XmlElement(*child)); - return new ContentDescription( - config.release(), authenticator_message.release()); + return new ContentDescription(config.Pass(), authenticator_message.Pass()); } LOG(ERROR) << "Invalid description: " << element->Str(); return NULL; -- cgit v1.1