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

Side by Side Diff: remoting/protocol/pepper_transport_factory.cc

Issue 9549029: Set incoming_only flag on the host side when NAT traversal is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/protocol/pepper_transport_factory.h" 5 #include "remoting/protocol/pepper_transport_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "crypto/hmac.h" 8 #include "crypto/hmac.h"
9 #include "jingle/glue/utils.h" 9 #include "jingle/glue/utils.h"
10 #include "net/base/cert_status_flags.h" 10 #include "net/base/cert_status_flags.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 if (transport->SetProperty(PP_TRANSPORTPROPERTY_TCP_NO_DELAY, 142 if (transport->SetProperty(PP_TRANSPORTPROPERTY_TCP_NO_DELAY,
143 pp::Var(true)) != PP_OK) { 143 pp::Var(true)) != PP_OK) {
144 LOG(ERROR) << "Failed to set TCP_NODELAY"; 144 LOG(ERROR) << "Failed to set TCP_NODELAY";
145 } 145 }
146 146
147 if (transport->SetProperty(PP_TRANSPORTPROPERTY_TCP_ACK_DELAY, 147 if (transport->SetProperty(PP_TRANSPORTPROPERTY_TCP_ACK_DELAY,
148 pp::Var(kTcpAckDelayMilliseconds)) != PP_OK) { 148 pp::Var(kTcpAckDelayMilliseconds)) != PP_OK) {
149 LOG(ERROR) << "Failed to set TCP ACK delay."; 149 LOG(ERROR) << "Failed to set TCP ACK delay.";
150 } 150 }
151 151
152 if (config_.nat_traversal) { 152 if (config_.nat_traversal_mode == TransportConfig::NAT_TRAVERSAL_ENABLED) {
153 if (transport->SetProperty( 153 if (transport->SetProperty(
154 PP_TRANSPORTPROPERTY_STUN_SERVER, 154 PP_TRANSPORTPROPERTY_STUN_SERVER,
155 pp::Var(config_.stun_server)) != PP_OK) { 155 pp::Var(config_.stun_server)) != PP_OK) {
156 LOG(ERROR) << "Failed to set STUN server."; 156 LOG(ERROR) << "Failed to set STUN server.";
157 } 157 }
158 158
159 if (transport->SetProperty( 159 if (transport->SetProperty(
160 PP_TRANSPORTPROPERTY_RELAY_SERVER, 160 PP_TRANSPORTPROPERTY_RELAY_SERVER,
161 pp::Var(config_.relay_server)) != PP_OK) { 161 pp::Var(config_.relay_server)) != PP_OK) {
162 LOG(ERROR) << "Failed to set relay server."; 162 LOG(ERROR) << "Failed to set relay server.";
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 } 281 }
282 282
283 scoped_ptr<DatagramTransport> 283 scoped_ptr<DatagramTransport>
284 PepperTransportFactory::CreateDatagramTransport() { 284 PepperTransportFactory::CreateDatagramTransport() {
285 NOTIMPLEMENTED(); 285 NOTIMPLEMENTED();
286 return scoped_ptr<DatagramTransport>(NULL); 286 return scoped_ptr<DatagramTransport>(NULL);
287 } 287 }
288 288
289 } // namespace protocol 289 } // namespace protocol
290 } // namespace remoting 290 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698