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

Side by Side Diff: remoting/host/log_to_server.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/host/server_log_entry.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/log_to_server.h" 5 #include "remoting/host/log_to_server.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop_proxy.h" 8 #include "base/message_loop_proxy.h"
9 #include "remoting/base/constants.h" 9 #include "remoting/base/constants.h"
10 #include "remoting/host/chromoting_host.h" 10 #include "remoting/host/chromoting_host.h"
(...skipping 27 matching lines...) Expand all
38 LogToServer::~LogToServer() { 38 LogToServer::~LogToServer() {
39 signal_strategy_->RemoveListener(this); 39 signal_strategy_->RemoveListener(this);
40 if (host_) 40 if (host_)
41 host_->RemoveStatusObserver(this); 41 host_->RemoveStatusObserver(this);
42 } 42 }
43 43
44 void LogToServer::LogSessionStateChange(bool connected) { 44 void LogToServer::LogSessionStateChange(bool connected) {
45 DCHECK(CalledOnValidThread()); 45 DCHECK(CalledOnValidThread());
46 46
47 scoped_ptr<ServerLogEntry> entry( 47 scoped_ptr<ServerLogEntry> entry(
48 ServerLogEntry::MakeSessionStateChange(connected)); 48 ServerLogEntry::MakeForSessionStateChange(connected));
49 entry->AddHostFields(); 49 entry->AddHostFields();
50 entry->AddModeField(mode_); 50 entry->AddModeField(mode_);
51 51
52 if (connected) { 52 if (connected) {
53 DCHECK(connection_type_set_); 53 DCHECK(connection_type_set_);
54 entry->AddConnectionTypeField(connection_type_); 54 entry->AddConnectionTypeField(connection_type_);
55 } 55 }
56 Log(*entry.get()); 56 Log(*entry.get());
57 } 57 }
58 58
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 116 }
117 // Send the stanza to the server. 117 // Send the stanza to the server.
118 scoped_ptr<IqRequest> req = iq_sender_->SendIq( 118 scoped_ptr<IqRequest> req = iq_sender_->SendIq(
119 buzz::STR_SET, kChromotingBotJid, stanza.Pass(), 119 buzz::STR_SET, kChromotingBotJid, stanza.Pass(),
120 IqSender::ReplyCallback()); 120 IqSender::ReplyCallback());
121 // We ignore any response, so let the IqRequest be destroyed. 121 // We ignore any response, so let the IqRequest be destroyed.
122 return; 122 return;
123 } 123 }
124 124
125 } // namespace remoting 125 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/host/server_log_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698