Chromium Code Reviews| Index: remoting/protocol/libjingle_transport_factory.cc |
| =================================================================== |
| --- remoting/protocol/libjingle_transport_factory.cc (revision 135898) |
| +++ remoting/protocol/libjingle_transport_factory.cc (working copy) |
| @@ -14,6 +14,7 @@ |
| #include "remoting/protocol/transport_config.h" |
| #include "third_party/libjingle/source/talk/base/basicpacketsocketfactory.h" |
| #include "third_party/libjingle/source/talk/base/network.h" |
| +#include "third_party/libjingle/source/talk/p2p/base/constants.h" |
| #include "third_party/libjingle/source/talk/p2p/base/p2ptransportchannel.h" |
| #include "third_party/libjingle/source/talk/p2p/client/basicportallocator.h" |
| #include "third_party/libjingle/source/talk/p2p/client/httpportallocator.h" |
| @@ -73,6 +74,8 @@ |
| EventHandler* event_handler_; |
| StreamTransport::ConnectedCallback callback_; |
| scoped_ptr<ChannelAuthenticator> authenticator_; |
| + std::string ice_usernme_fragment_; |
|
Sergey Ulanov
2012/05/10 17:57:34
typo: username
Mallinath (Gone from Chromium)
2012/05/10 18:01:29
Done.
|
| + std::string ice_password_; |
| scoped_ptr<cricket::P2PTransportChannel> channel_; |
| @@ -87,7 +90,10 @@ |
| bool incoming_only) |
| : port_allocator_(port_allocator), |
| incoming_only_(incoming_only), |
| - event_handler_(NULL) { |
| + event_handler_(NULL), |
| + ice_usernme_fragment_( |
| + talk_base::CreateRandomString(cricket::ICE_UFRAG_LENGTH)), |
| + ice_password_(talk_base::CreateRandomString(cricket::ICE_PWD_LENGTH)) { |
| } |
| LibjingleStreamTransport::~LibjingleStreamTransport() { |
| @@ -131,6 +137,8 @@ |
| // TODO(sergeyu): Specify correct component ID for the channel. |
| channel_.reset(new cricket::P2PTransportChannel( |
| name_, 0, NULL, port_allocator_)); |
| + channel_->SetIceUfrag(ice_usernme_fragment_); |
| + channel_->SetIcePwd(ice_password_); |
| channel_->SignalRequestSignaling.connect( |
| this, &LibjingleStreamTransport::OnRequestSignaling); |
| channel_->SignalCandidateReady.connect( |