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

Unified Diff: remoting/protocol/pepper_stream_channel.cc

Issue 7888022: Add DISABLE_TCP_TRANSPORT flag in the Transport API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 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
Index: remoting/protocol/pepper_stream_channel.cc
diff --git a/remoting/protocol/pepper_stream_channel.cc b/remoting/protocol/pepper_stream_channel.cc
index 49d38f6c142f1ca095ddf022b2f33908e557bf54..c30bfa4738435826d8cedd252d07252b56c1db88 100644
--- a/remoting/protocol/pepper_stream_channel.cc
+++ b/remoting/protocol/pepper_stream_channel.cc
@@ -116,6 +116,8 @@ void PepperStreamChannel::Connect(pp::Instance* pp_instance,
LOG(ERROR) << "Failed to set TCP ACK delay.";
}
+ int32 ports = PP_TRANSPORTPORTS_UDP;
+
if (transport_config.nat_traversal) {
if (transport->SetProperty(
PP_TRANSPORTPROPERTY_STUN_SERVER,
@@ -140,6 +142,13 @@ void PepperStreamChannel::Connect(pp::Instance* pp_instance,
pp::Var(PP_TRANSPORTRELAYMODE_GOOGLE)) != PP_OK) {
LOG(ERROR) << "Failed to set relay mode.";
}
+
+ ports |= PP_TRANSPORTPORTS_STUN | PP_TRANSPORTPORTS_RELAY_UDP;
+ }
+
+ if (transport->SetProperty(PP_TRANSPORTPROPERTY_PORT_TYPES,
+ pp::Var(ports)) != PP_OK) {
+ LOG(ERROR) << "Failed to set port types.";
}
channel_ = new PepperTransportSocketAdapter(transport, name_, this);

Powered by Google App Engine
This is Rietveld 408576698