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

Side by Side Diff: webrtc/p2p/base/transportchannel.cc

Issue 1246913005: TransportController refactoring (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merging again Created 5 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include <sstream> 11 #include <sstream>
12 #include "webrtc/p2p/base/common.h" 12 #include "webrtc/p2p/base/common.h"
13 #include "webrtc/p2p/base/transportchannel.h" 13 #include "webrtc/p2p/base/transportchannel.h"
14 14
15 namespace cricket { 15 namespace cricket {
16 16
17 std::string TransportChannel::ToString() const { 17 std::string TransportChannel::ToString() const {
18 const char READABLE_ABBREV[2] = { '_', 'R' }; 18 const char READABLE_ABBREV[2] = { '_', 'R' };
19 const char WRITABLE_ABBREV[2] = { '_', 'W' }; 19 const char WRITABLE_ABBREV[2] = { '_', 'W' };
20 std::stringstream ss; 20 std::stringstream ss;
21 ss << "Channel[" << content_name_ 21 ss << "Channel[" << transport_name_ << "|" << component_ << "|"
22 << "|" << component_ 22 << READABLE_ABBREV[readable_] << WRITABLE_ABBREV[writable_] << "]";
23 << "|" << READABLE_ABBREV[readable_] << WRITABLE_ABBREV[writable_] << "]";
24 return ss.str(); 23 return ss.str();
25 } 24 }
26 25
27 void TransportChannel::set_readable(bool readable) { 26 void TransportChannel::set_readable(bool readable) {
28 if (readable_ != readable) { 27 if (readable_ != readable) {
29 readable_ = readable; 28 readable_ = readable;
30 SignalReadableState(this); 29 SignalReadableState(this);
31 } 30 }
32 } 31 }
33 32
(...skipping 11 matching lines...) Expand all
45 << writable; 44 << writable;
46 writable_ = writable; 45 writable_ = writable;
47 if (writable_) { 46 if (writable_) {
48 SignalReadyToSend(this); 47 SignalReadyToSend(this);
49 } 48 }
50 SignalWritableState(this); 49 SignalWritableState(this);
51 } 50 }
52 } 51 }
53 52
54 } // namespace cricket 53 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698