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

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

Issue 22381012: Allow p2p UDP packages to set DSCP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed tests Created 7 years, 4 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
« no previous file with comments | « no previous file | content/browser/renderer_host/p2p/socket_host_udp_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_udp.h" 5 #include "content/browser/renderer_host/p2p/socket_host_udp.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "content/common/p2p_messages.h" 9 #include "content/common/p2p_messages.h"
10 #include "ipc/ipc_sender.h" 10 #include "ipc/ipc_sender.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 60
61 P2PSocketHostUdp::PendingPacket::~PendingPacket() { 61 P2PSocketHostUdp::PendingPacket::~PendingPacket() {
62 } 62 }
63 63
64 P2PSocketHostUdp::P2PSocketHostUdp(IPC::Sender* message_sender, int id) 64 P2PSocketHostUdp::P2PSocketHostUdp(IPC::Sender* message_sender, int id)
65 : P2PSocketHost(message_sender, id), 65 : P2PSocketHost(message_sender, id),
66 socket_(new net::UDPServerSocket(NULL, net::NetLog::Source())), 66 socket_(new net::UDPServerSocket(NULL, net::NetLog::Source())),
67 send_pending_(false), 67 send_pending_(false),
68 send_packet_count_(0) { 68 send_packet_count_(0) {
69 socket_->SetToS(net::DSCP_AF41);
juberti2 2013/08/08 00:44:45 Seems a little dangerous to set this by default. S
hubbe 2013/08/08 23:23:01 Changed this CL to plumb dscp through the IPC laye
69 } 70 }
70 71
71 P2PSocketHostUdp::~P2PSocketHostUdp() { 72 P2PSocketHostUdp::~P2PSocketHostUdp() {
72 if (state_ == STATE_OPEN) { 73 if (state_ == STATE_OPEN) {
73 DCHECK(socket_.get()); 74 DCHECK(socket_.get());
74 socket_.reset(); 75 socket_.reset();
75 } 76 }
76 } 77 }
77 78
78 bool P2PSocketHostUdp::Init(const net::IPEndPoint& local_address, 79 bool P2PSocketHostUdp::Init(const net::IPEndPoint& local_address,
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 252 }
252 253
253 P2PSocketHost* P2PSocketHostUdp::AcceptIncomingTcpConnection( 254 P2PSocketHost* P2PSocketHostUdp::AcceptIncomingTcpConnection(
254 const net::IPEndPoint& remote_address, int id) { 255 const net::IPEndPoint& remote_address, int id) {
255 NOTREACHED(); 256 NOTREACHED();
256 OnError(); 257 OnError();
257 return NULL; 258 return NULL;
258 } 259 }
259 260
260 } // namespace content 261 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/p2p/socket_host_udp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698