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

Side by Side Diff: remoting/host/log_to_server.cc

Issue 9005034: Refactor SignalStrategy so that it can be reused for multiple connections. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/log_to_server.h ('k') | remoting/host/log_to_server_unittest.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/server_log_entry.h" 10 #include "remoting/host/server_log_entry.h"
(...skipping 19 matching lines...) Expand all
30 LogToServer::~LogToServer() { 30 LogToServer::~LogToServer() {
31 } 31 }
32 32
33 void LogToServer::LogSessionStateChange(bool connected) { 33 void LogToServer::LogSessionStateChange(bool connected) {
34 scoped_ptr<ServerLogEntry> entry(ServerLogEntry::MakeSessionStateChange( 34 scoped_ptr<ServerLogEntry> entry(ServerLogEntry::MakeSessionStateChange(
35 connected)); 35 connected));
36 entry->AddHostFields(); 36 entry->AddHostFields();
37 Log(*entry.get()); 37 Log(*entry.get());
38 } 38 }
39 39
40 void LogToServer::OnSignallingConnected(SignalStrategy* signal_strategy, 40 void LogToServer::OnSignallingConnected(SignalStrategy* signal_strategy) {
41 const std::string& full_jid) {
42 DCHECK(message_loop_->BelongsToCurrentThread()); 41 DCHECK(message_loop_->BelongsToCurrentThread());
43 iq_sender_.reset(new IqSender(signal_strategy)); 42 iq_sender_.reset(new IqSender(signal_strategy));
44 SendPendingEntries(); 43 SendPendingEntries();
45 } 44 }
46 45
47 void LogToServer::OnSignallingDisconnected() { 46 void LogToServer::OnSignallingDisconnected() {
48 DCHECK(message_loop_->BelongsToCurrentThread()); 47 DCHECK(message_loop_->BelongsToCurrentThread());
49 iq_sender_.reset(); 48 iq_sender_.reset();
50 } 49 }
51 50
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 87 }
89 // Send the stanza to the server. 88 // Send the stanza to the server.
90 scoped_ptr<IqRequest> req(iq_sender_->SendIq( 89 scoped_ptr<IqRequest> req(iq_sender_->SendIq(
91 buzz::STR_SET, kChromotingBotJid, stanza.release(), 90 buzz::STR_SET, kChromotingBotJid, stanza.release(),
92 IqSender::ReplyCallback())); 91 IqSender::ReplyCallback()));
93 // We ignore any response, so let the IqRequest be destroyed. 92 // We ignore any response, so let the IqRequest be destroyed.
94 return; 93 return;
95 } 94 }
96 95
97 } // namespace remoting 96 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/log_to_server.h ('k') | remoting/host/log_to_server_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698