Chromium Code Reviews| Index: webrtc/p2p/base/dtlstransport.h |
| diff --git a/webrtc/p2p/base/dtlstransport.h b/webrtc/p2p/base/dtlstransport.h |
| index 27cece49d04ea9cfe328ad0084eca36a7b967f93..8d2c83a79f6e8b20a9c5550c117d0ba55713a567 100644 |
| --- a/webrtc/p2p/base/dtlstransport.h |
| +++ b/webrtc/p2p/base/dtlstransport.h |
| @@ -26,12 +26,10 @@ class PortAllocator; |
| template<class Base> |
| class DtlsTransport : public Base { |
|
pthatcher1
2015/08/10 20:40:17
Can you comment that everything in this class shou
Taylor Brandstetter
2015/08/11 01:20:07
Done. Added comment to its base class (Transport)
|
| public: |
| - DtlsTransport(rtc::Thread* signaling_thread, |
| - rtc::Thread* worker_thread, |
| - const std::string& content_name, |
| + DtlsTransport(const std::string& content_name, |
| PortAllocator* allocator, |
| rtc::SSLIdentity* identity) |
| - : Base(signaling_thread, worker_thread, content_name, allocator), |
| + : Base(content_name, allocator), |
| identity_(identity), |
| secure_role_(rtc::SSL_CLIENT), |
| ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10) { |
| @@ -40,10 +38,11 @@ class DtlsTransport : public Base { |
| ~DtlsTransport() { |
| Base::DestroyAllChannels(); |
| } |
| - virtual void SetIdentity_w(rtc::SSLIdentity* identity) { |
| + |
| + virtual void SetIdentity(rtc::SSLIdentity* identity) { |
| identity_ = identity; |
| } |
| - virtual bool GetIdentity_w(rtc::SSLIdentity** identity) { |
| + virtual bool GetIdentity(rtc::SSLIdentity** identity) { |
| if (!identity_) |
| return false; |
| @@ -51,12 +50,12 @@ class DtlsTransport : public Base { |
| return true; |
| } |
| - virtual bool SetSslMaxProtocolVersion_w(rtc::SSLProtocolVersion version) { |
| + virtual bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version) { |
| ssl_max_version_ = version; |
| return true; |
| } |
| - virtual bool ApplyLocalTransportDescription_w(TransportChannelImpl* channel, |
| + virtual bool ApplyLocalTransportDescription(TransportChannelImpl* channel, |
| std::string* error_desc) { |
| rtc::SSLFingerprint* local_fp = |
| Base::local_description()->identity_fingerprint.get(); |
| @@ -90,10 +89,10 @@ class DtlsTransport : public Base { |
| } |
| // Apply the description in the base class. |
| - return Base::ApplyLocalTransportDescription_w(channel, error_desc); |
| + return Base::ApplyLocalTransportDescription(channel, error_desc); |
| } |
| - virtual bool NegotiateTransportDescription_w(ContentAction local_role, |
| + virtual bool NegotiateTransportDescription(ContentAction local_role, |
| std::string* error_desc) { |
| if (!Base::local_description() || !Base::remote_description()) { |
| const std::string msg = "Local and Remote description must be set before " |
| @@ -191,7 +190,7 @@ class DtlsTransport : public Base { |
| } |
| // Now run the negotiation for the base class. |
| - return Base::NegotiateTransportDescription_w(local_role, error_desc); |
| + return Base::NegotiateTransportDescription(local_role, error_desc); |
| } |
| virtual DtlsTransportChannelWrapper* CreateTransportChannel(int component) { |
| @@ -210,16 +209,15 @@ class DtlsTransport : public Base { |
| Base::DestroyTransportChannel(base_channel); |
| } |
| - virtual bool GetSslRole_w(rtc::SSLRole* ssl_role) const { |
| + virtual bool GetSslRole(rtc::SSLRole* ssl_role) const { |
| ASSERT(ssl_role != NULL); |
| *ssl_role = secure_role_; |
| return true; |
| } |
| - private: |
| - virtual bool ApplyNegotiatedTransportDescription_w( |
| + bool ApplyNegotiatedTransportDescription( |
| TransportChannelImpl* channel, |
| - std::string* error_desc) { |
| + std::string* error_desc) override { |
| // Set ssl role. Role must be set before fingerprint is applied, which |
| // initiates DTLS setup. |
| if (!channel->SetSslRole(secure_role_)) { |
| @@ -234,9 +232,10 @@ class DtlsTransport : public Base { |
| return BadTransportDescription("Failed to apply remote fingerprint.", |
| error_desc); |
| } |
| - return Base::ApplyNegotiatedTransportDescription_w(channel, error_desc); |
| + return Base::ApplyNegotiatedTransportDescription(channel, error_desc); |
| } |
| + private: |
| rtc::SSLIdentity* identity_; |
| rtc::SSLRole secure_role_; |
| rtc::SSLProtocolVersion ssl_max_version_; |