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

Side by Side Diff: remoting/protocol/jingle_session.cc

Issue 9727005: Log connection type to syslogs and to the server. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/connection_to_client.cc ('k') | remoting/protocol/protocol_mock_objects.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/protocol/jingle_session.h" 5 #include "remoting/protocol/jingle_session.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/rand_util.h" 8 #include "base/rand_util.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // Delay sending the new candidates in case we get more candidates 252 // Delay sending the new candidates in case we get more candidates
253 // that we can send in one message. 253 // that we can send in one message.
254 transport_infos_timer_.Start( 254 transport_infos_timer_.Start(
255 FROM_HERE, base::TimeDelta::FromMilliseconds(kTransportInfoSendDelayMs), 255 FROM_HERE, base::TimeDelta::FromMilliseconds(kTransportInfoSendDelayMs),
256 this, &JingleSession::SendTransportInfo); 256 this, &JingleSession::SendTransportInfo);
257 } 257 }
258 } 258 }
259 259
260 void JingleSession::OnTransportRouteChange(Transport* transport, 260 void JingleSession::OnTransportRouteChange(Transport* transport,
261 const TransportRoute& route) { 261 const TransportRoute& route) {
262 if (!route_change_callback_.is_null()) { 262 if (!route_change_callback_.is_null())
263 route_change_callback_.Run(transport->name(), route.remote_address, 263 route_change_callback_.Run(transport->name(), route);
264 route.local_address);
265 }
266 } 264 }
267 265
268 void JingleSession::OnTransportDeleted(Transport* transport) { 266 void JingleSession::OnTransportDeleted(Transport* transport) {
269 ChannelsMap::iterator it = channels_.find(transport->name()); 267 ChannelsMap::iterator it = channels_.find(transport->name());
270 DCHECK_EQ(it->second, transport); 268 DCHECK_EQ(it->second, transport);
271 channels_.erase(it); 269 channels_.erase(it);
272 } 270 }
273 271
274 void JingleSession::SendMessage(const JingleMessage& message) { 272 void JingleSession::SendMessage(const JingleMessage& message) {
275 scoped_ptr<IqRequest> request = session_manager_->iq_sender()->SendIq( 273 scoped_ptr<IqRequest> request = session_manager_->iq_sender()->SendIq(
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 DCHECK_NE(state_, FAILED); 575 DCHECK_NE(state_, FAILED);
578 576
579 state_ = new_state; 577 state_ = new_state;
580 if (!state_change_callback_.is_null()) 578 if (!state_change_callback_.is_null())
581 state_change_callback_.Run(new_state); 579 state_change_callback_.Run(new_state);
582 } 580 }
583 } 581 }
584 582
585 } // namespace protocol 583 } // namespace protocol
586 } // namespace remoting 584 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/connection_to_client.cc ('k') | remoting/protocol/protocol_mock_objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698