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

Unified Diff: remoting/host/server_log_entry.cc

Issue 10399127: [Chromoting] Replace some bare pointers with scoped_ptrs, and improve naming. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 672949fcfaa093399cf903f26bd19ef24b5396dc..98f39eec002aae5dab50b17efa5af86e28deeb18 100644
--- a/remoting/host/server_log_entry.cc
+++ b/remoting/host/server_log_entry.cc
@@ -63,20 +63,21 @@ scoped_ptr<buzz::XmlElement> ServerLogEntry::MakeStanza() {
}
// static
-ServerLogEntry* ServerLogEntry::MakeSessionStateChange(bool connected) {
- ServerLogEntry* entry = new ServerLogEntry();
+scoped_ptr<ServerLogEntry> ServerLogEntry::MakeForSessionStateChange(
+ bool connected) {
+ scoped_ptr<ServerLogEntry> entry(new ServerLogEntry());
entry->Set(kKeyRole, kValueRoleHost);
entry->Set(kKeyEventName, kValueEventNameSessionState);
entry->Set(kKeySessionState, GetValueSessionState(connected));
- return entry;
+ return entry.Pass();
}
// static
-ServerLogEntry* ServerLogEntry::MakeForHeartbeat() {
- ServerLogEntry* entry = new ServerLogEntry();
+scoped_ptr<ServerLogEntry> ServerLogEntry::MakeForHeartbeat() {
+ scoped_ptr<ServerLogEntry> entry(new ServerLogEntry());
entry->Set(kKeyRole, kValueRoleHost);
entry->Set(kKeyEventName, kValueEventNameHeartbeat);
- return entry;
+ return entry.Pass();
}
void ServerLogEntry::AddHostFields() {
« 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