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

Side by Side Diff: net/socket/tcp_server_socket.h

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef NET_SOCKET_TCP_SERVER_SOCKET_H_ 5 #ifndef NET_SOCKET_TCP_SERVER_SOCKET_H_
6 #define NET_SOCKET_TCP_SERVER_SOCKET_H_ 6 #define NET_SOCKET_TCP_SERVER_SOCKET_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "net/base/ip_endpoint.h" 11 #include "net/base/ip_endpoint.h"
12 #include "net/base/net_export.h" 12 #include "net/base/net_export.h"
13 #include "net/log/net_log.h"
14 #include "net/socket/server_socket.h" 13 #include "net/socket/server_socket.h"
15 #include "net/socket/tcp_socket.h" 14 #include "net/socket/tcp_socket.h"
16 15
17 namespace net { 16 namespace net {
18 17
18 class NetLog;
19 struct NetLogSource;
20
19 class NET_EXPORT TCPServerSocket : public ServerSocket { 21 class NET_EXPORT TCPServerSocket : public ServerSocket {
20 public: 22 public:
21 TCPServerSocket(NetLog* net_log, const NetLog::Source& source); 23 TCPServerSocket(NetLog* net_log, const NetLogSource& source);
22 ~TCPServerSocket() override; 24 ~TCPServerSocket() override;
23 25
24 // net::ServerSocket implementation. 26 // net::ServerSocket implementation.
25 int Listen(const IPEndPoint& address, int backlog) override; 27 int Listen(const IPEndPoint& address, int backlog) override;
26 int GetLocalAddress(IPEndPoint* address) const override; 28 int GetLocalAddress(IPEndPoint* address) const override;
27 int Accept(std::unique_ptr<StreamSocket>* socket, 29 int Accept(std::unique_ptr<StreamSocket>* socket,
28 const CompletionCallback& callback) override; 30 const CompletionCallback& callback) override;
29 31
30 // Detachs from the current thread, to allow the socket to be transferred to 32 // Detachs from the current thread, to allow the socket to be transferred to
31 // a new thread. Should only be called when the object is no longer used by 33 // a new thread. Should only be called when the object is no longer used by
(...skipping 18 matching lines...) Expand all
50 std::unique_ptr<TCPSocket> accepted_socket_; 52 std::unique_ptr<TCPSocket> accepted_socket_;
51 IPEndPoint accepted_address_; 53 IPEndPoint accepted_address_;
52 bool pending_accept_; 54 bool pending_accept_;
53 55
54 DISALLOW_COPY_AND_ASSIGN(TCPServerSocket); 56 DISALLOW_COPY_AND_ASSIGN(TCPServerSocket);
55 }; 57 };
56 58
57 } // namespace net 59 } // namespace net
58 60
59 #endif // NET_SOCKET_TCP_SERVER_SOCKET_H_ 61 #endif // NET_SOCKET_TCP_SERVER_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698