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

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

Issue 677473002: Implement UMA and internal data structure for tracking EWOULDBLOCK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
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_server.h" 5 #include "content/browser/renderer_host/p2p/socket_host_tcp_server.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "content/browser/renderer_host/p2p/socket_host_tcp.h" 10 #include "content/browser/renderer_host/p2p/socket_host_tcp.h"
11 #include "content/common/p2p_messages.h" 11 #include "content/common/p2p_messages.h"
12 #include "net/base/address_list.h" 12 #include "net/base/address_list.h"
13 #include "net/base/net_errors.h" 13 #include "net/base/net_errors.h"
14 #include "net/base/net_util.h" 14 #include "net/base/net_util.h"
15 #include "net/socket/stream_socket.h" 15 #include "net/socket/stream_socket.h"
16 16
17 namespace { 17 namespace {
18 const int kListenBacklog = 5; 18 const int kListenBacklog = 5;
19 } // namespace 19 } // namespace
20 20
21 namespace content { 21 namespace content {
22 22
23 P2PSocketHostTcpServer::P2PSocketHostTcpServer(IPC::Sender* message_sender, 23 P2PSocketHostTcpServer::P2PSocketHostTcpServer(IPC::Sender* message_sender,
24 int socket_id, 24 int socket_id,
25 P2PSocketType client_type) 25 P2PSocketType client_type)
26 : P2PSocketHost(message_sender, socket_id), 26 : P2PSocketHost(message_sender, socket_id, P2PSocketHost::TCP),
27 client_type_(client_type), 27 client_type_(client_type),
28 socket_(new net::TCPServerSocket(NULL, net::NetLog::Source())), 28 socket_(new net::TCPServerSocket(NULL, net::NetLog::Source())),
29 accept_callback_(base::Bind(&P2PSocketHostTcpServer::OnAccepted, 29 accept_callback_(base::Bind(&P2PSocketHostTcpServer::OnAccepted,
30 base::Unretained(this))) { 30 base::Unretained(this))) {
31 } 31 }
32 32
33 P2PSocketHostTcpServer::~P2PSocketHostTcpServer() { 33 P2PSocketHostTcpServer::~P2PSocketHostTcpServer() {
34 STLDeleteContainerPairSecondPointers(accepted_sockets_.begin(), 34 STLDeleteContainerPairSecondPointers(accepted_sockets_.begin(),
35 accepted_sockets_.end()); 35 accepted_sockets_.end());
36 36
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 return result.release(); 146 return result.release();
147 } 147 }
148 148
149 bool P2PSocketHostTcpServer::SetOption(P2PSocketOption option, 149 bool P2PSocketHostTcpServer::SetOption(P2PSocketOption option,
150 int value) { 150 int value) {
151 // Currently we don't have use case tcp server sockets are used for p2p. 151 // Currently we don't have use case tcp server sockets are used for p2p.
152 return false; 152 return false;
153 } 153 }
154 154
155 } // namespace content 155 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/p2p/socket_host_tcp.cc ('k') | content/browser/renderer_host/p2p/socket_host_udp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698