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

Unified Diff: remoting/protocol/jingle_session_manager.cc

Issue 10160012: Pass TransportConfig to TransportFactory instead of Transport. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « remoting/protocol/jingle_session_manager.h ('k') | remoting/protocol/libjingle_transport_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/jingle_session_manager.cc
diff --git a/remoting/protocol/jingle_session_manager.cc b/remoting/protocol/jingle_session_manager.cc
index 0a9e87f57466b61daf527a592ff140f8b6c1ebfe..f3231af793c00eac7e583283d90ae3dafa5ebc3d 100644
--- a/remoting/protocol/jingle_session_manager.cc
+++ b/remoting/protocol/jingle_session_manager.cc
@@ -12,6 +12,8 @@
#include "remoting/protocol/content_description.h"
#include "remoting/protocol/jingle_messages.h"
#include "remoting/protocol/jingle_session.h"
+#include "remoting/protocol/transport.h"
+#include "remoting/protocol/transport_config.h"
#include "third_party/libjingle/source/talk/base/socketaddress.h"
#include "third_party/libjingle/source/talk/xmllite/xmlelement.h"
@@ -54,12 +56,16 @@ void JingleSessionManager::OnJingleInfo(
// TODO(sergeyu): Add support for multiple STUN/relay servers when
// it's implemented in libjingle and P2P Transport API.
- transport_config_.stun_server = stun_hosts[0].ToString();
- transport_config_.relay_server = relay_hosts[0];
- transport_config_.relay_token = relay_token;
- VLOG(1) << "STUN server: " << transport_config_.stun_server
- << " Relay server: " << transport_config_.relay_server
- << " Relay token: " << transport_config_.relay_token;
+ TransportConfig config;
+ config.stun_server = stun_hosts[0].ToString();
+ config.relay_server = relay_hosts[0];
+ config.relay_token = relay_token;
+ transport_factory_->SetTransportConfig(config);
+
+ VLOG(1) << "STUN server: " << config.stun_server
+ << " Relay server: " << config.relay_server
+ << " Relay token: " << config.relay_token;
+
if (!ready_) {
ready_ = true;
« no previous file with comments | « remoting/protocol/jingle_session_manager.h ('k') | remoting/protocol/libjingle_transport_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698