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

Unified Diff: remoting/protocol/content_description.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/content_description.cc
diff --git a/remoting/protocol/content_description.cc b/remoting/protocol/content_description.cc
index 15583b0f9d40cfb398f324358a788baf7eb3446a..5e157ad08009ac8d8922d945dcc688437ef0c90b 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<CandidateSessionConfig> config,
+ scoped_ptr<buzz::XmlElement> 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;

Powered by Google App Engine
This is Rietveld 408576698