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

Unified Diff: remoting/host/server_log_entry.cc

Issue 9720019: Use scoped_ptr<> to pass ownership in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
« no previous file with comments | « remoting/host/server_log_entry.h ('k') | remoting/host/server_log_entry_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/server_log_entry.cc
diff --git a/remoting/host/server_log_entry.cc b/remoting/host/server_log_entry.cc
index 6e1a2672250ac3826926f3f9504edecc6afcb271..18f85c7822463442a26849ad19d8dede104d7311 100644
--- a/remoting/host/server_log_entry.cc
+++ b/remoting/host/server_log_entry.cc
@@ -102,14 +102,14 @@ const char* ServerLogEntry::GetValueMode(ServerLogEntry::Mode mode) {
}
}
-XmlElement* ServerLogEntry::ToStanza() const {
- XmlElement* stanza = new XmlElement(QName(
- kChromotingXmlNamespace, kLogEntry));
+scoped_ptr<XmlElement> ServerLogEntry::ToStanza() const {
+ scoped_ptr<XmlElement> stanza(new XmlElement(QName(
+ kChromotingXmlNamespace, kLogEntry)));
ValuesMap::const_iterator iter;
for (iter = values_map_.begin(); iter != values_map_.end(); ++iter) {
stanza->AddAttr(QName("", iter->first), iter->second);
}
- return stanza;
+ return stanza.Pass();
}
const char* ServerLogEntry::GetValueSessionState(bool connected) {
« no previous file with comments | « remoting/host/server_log_entry.h ('k') | remoting/host/server_log_entry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698