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

Unified Diff: webrtc/p2p/base/transportchannel.h

Issue 1350523003: TransportController refactoring. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing Mac test. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/base/transport_unittest.cc ('k') | webrtc/p2p/base/transportchannel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/transportchannel.h
diff --git a/webrtc/p2p/base/transportchannel.h b/webrtc/p2p/base/transportchannel.h
index f195a0edc2f01211187f4c77ea737abdcb188ccb..5e7adfa9c7e76727ec2a4b79bdcd958c878f8197 100644
--- a/webrtc/p2p/base/transportchannel.h
+++ b/webrtc/p2p/base/transportchannel.h
@@ -37,14 +37,19 @@ enum PacketFlags {
};
// Used to indicate channel's connection state.
-enum TransportChannelState { STATE_CONNECTING, STATE_COMPLETED, STATE_FAILED };
+enum TransportChannelState {
+ STATE_INIT,
+ STATE_CONNECTING, // Will enter this state once a connection is created
+ STATE_COMPLETED,
+ STATE_FAILED
+};
// A TransportChannel represents one logical stream of packets that are sent
// between the two sides of a session.
class TransportChannel : public sigslot::has_slots<> {
public:
- explicit TransportChannel(const std::string& content_name, int component)
- : content_name_(content_name),
+ explicit TransportChannel(const std::string& transport_name, int component)
+ : transport_name_(transport_name),
component_(component),
writable_(false),
receiving_(false) {}
@@ -60,7 +65,7 @@ class TransportChannel : public sigslot::has_slots<> {
// Returns the session id of this channel.
virtual const std::string SessionId() const { return std::string(); }
- const std::string& content_name() const { return content_name_; }
+ const std::string& transport_name() const { return transport_name_; }
int component() const { return component_; }
// Returns the states of this channel. Each time one of these states changes,
@@ -146,10 +151,9 @@ class TransportChannel : public sigslot::has_slots<> {
// Sets the receiving state, signaling if necessary.
void set_receiving(bool receiving);
-
private:
// Used mostly for debugging.
- std::string content_name_;
+ std::string transport_name_;
int component_;
bool writable_;
bool receiving_;
« no previous file with comments | « webrtc/p2p/base/transport_unittest.cc ('k') | webrtc/p2p/base/transportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698