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

Side by Side Diff: content/browser/renderer_host/p2p/socket_host_tcp.cc

Issue 22381012: Allow p2p UDP packages to set DSCP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: stub out DSCP for windows for now Created 7 years, 2 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 "content/browser/renderer_host/p2p/socket_host_tcp.h" 5 #include "content/browser/renderer_host/p2p/socket_host_tcp.h"
6 6
7 #include "base/sys_byteorder.h" 7 #include "base/sys_byteorder.h"
8 #include "content/common/p2p_messages.h" 8 #include "content/common/p2p_messages.h"
9 #include "ipc/ipc_sender.h" 9 #include "ipc/ipc_sender.h"
10 #include "jingle/glue/fake_ssl_client_socket.h" 10 #include "jingle/glue/fake_ssl_client_socket.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 << "Terminating connection."; 265 << "Terminating connection.";
266 OnError(); 266 OnError();
267 return; 267 return;
268 } 268 }
269 } 269 }
270 270
271 message_sender_->Send(new P2PMsg_OnDataReceived(id_, remote_address_, data)); 271 message_sender_->Send(new P2PMsg_OnDataReceived(id_, remote_address_, data));
272 } 272 }
273 273
274 void P2PSocketHostTcpBase::Send(const net::IPEndPoint& to, 274 void P2PSocketHostTcpBase::Send(const net::IPEndPoint& to,
275 const std::vector<char>& data) { 275 const std::vector<char>& data,
276 net::DiffServCodePoint dscp) {
cbentzel 2013/10/17 01:32:57 Do you want to comment that |dscp| is intentionall
hubbe 2013/10/21 19:39:21 Done.
276 if (!socket_) { 277 if (!socket_) {
277 // The Send message may be sent after the an OnError message was 278 // The Send message may be sent after the an OnError message was
278 // sent by hasn't been processed the renderer. 279 // sent by hasn't been processed the renderer.
279 return; 280 return;
280 } 281 }
281 282
282 if (!(to == remote_address_)) { 283 if (!(to == remote_address_)) {
283 // Renderer should use this socket only to send data to |remote_address_|. 284 // Renderer should use this socket only to send data to |remote_address_|.
284 NOTREACHED(); 285 NOTREACHED();
285 OnError(); 286 OnError();
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 } else { 512 } else {
512 packet_size += kTurnChannelDataHeaderSize; 513 packet_size += kTurnChannelDataHeaderSize;
513 // Calculate any padding if present. 514 // Calculate any padding if present.
514 if (packet_size % 4) 515 if (packet_size % 4)
515 *pad_bytes = 4 - packet_size % 4; 516 *pad_bytes = 4 - packet_size % 4;
516 } 517 }
517 return packet_size; 518 return packet_size;
518 } 519 }
519 520
520 } // namespace content 521 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698