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

Side by Side Diff: net/udp/udp_socket_posix.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) 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 #ifndef NET_UDP_UDP_SOCKET_POSIX_H_ 5 #ifndef NET_UDP_UDP_SOCKET_POSIX_H_
6 #define NET_UDP_UDP_SOCKET_POSIX_H_ 6 #define NET_UDP_UDP_SOCKET_POSIX_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "base/threading/non_thread_safe.h" 15 #include "base/threading/non_thread_safe.h"
16 #include "net/base/address_family.h" 16 #include "net/base/address_family.h"
17 #include "net/base/completion_callback.h" 17 #include "net/base/completion_callback.h"
18 #include "net/base/io_buffer.h" 18 #include "net/base/io_buffer.h"
19 #include "net/base/ip_endpoint.h" 19 #include "net/base/ip_endpoint.h"
20 #include "net/base/net_export.h" 20 #include "net/base/net_export.h"
21 #include "net/base/network_change_notifier.h" 21 #include "net/base/network_change_notifier.h"
22 #include "net/base/rand_callback.h" 22 #include "net/base/rand_callback.h"
23 #include "net/log/net_log.h" 23 #include "net/log/net_log_with_source.h"
24 #include "net/socket/socket_descriptor.h" 24 #include "net/socket/socket_descriptor.h"
25 #include "net/udp/datagram_socket.h" 25 #include "net/udp/datagram_socket.h"
26 #include "net/udp/diff_serv_code_point.h" 26 #include "net/udp/diff_serv_code_point.h"
27 27
28 namespace net { 28 namespace net {
29 29
30 class IPAddress; 30 class IPAddress;
31 class NetLog;
32 struct NetLogSource;
31 33
32 class NET_EXPORT UDPSocketPosix : public base::NonThreadSafe { 34 class NET_EXPORT UDPSocketPosix : public base::NonThreadSafe {
33 public: 35 public:
34 UDPSocketPosix(DatagramSocket::BindType bind_type, 36 UDPSocketPosix(DatagramSocket::BindType bind_type,
35 const RandIntCallback& rand_int_cb, 37 const RandIntCallback& rand_int_cb,
36 net::NetLog* net_log, 38 net::NetLog* net_log,
37 const net::NetLog::Source& source); 39 const net::NetLogSource& source);
38 virtual ~UDPSocketPosix(); 40 virtual ~UDPSocketPosix();
39 41
40 // Opens the socket. 42 // Opens the socket.
41 // Returns a net error code. 43 // Returns a net error code.
42 int Open(AddressFamily address_family); 44 int Open(AddressFamily address_family);
43 45
44 // Binds this socket to |network|. All data traffic on the socket will be sent 46 // Binds this socket to |network|. All data traffic on the socket will be sent
45 // and received via |network|. Must be called before Connect(). This call will 47 // and received via |network|. Must be called before Connect(). This call will
46 // fail if |network| has disconnected. Communication using this socket will 48 // fail if |network| has disconnected. Communication using this socket will
47 // fail if |network| disconnects. 49 // fail if |network| disconnects.
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 321
320 // Network that this socket is bound to via BindToNetwork(). 322 // Network that this socket is bound to via BindToNetwork().
321 NetworkChangeNotifier::NetworkHandle bound_network_; 323 NetworkChangeNotifier::NetworkHandle bound_network_;
322 324
323 DISALLOW_COPY_AND_ASSIGN(UDPSocketPosix); 325 DISALLOW_COPY_AND_ASSIGN(UDPSocketPosix);
324 }; 326 };
325 327
326 } // namespace net 328 } // namespace net
327 329
328 #endif // NET_UDP_UDP_SOCKET_POSIX_H_ 330 #endif // NET_UDP_UDP_SOCKET_POSIX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698