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

Side by Side Diff: net/udp/udp_socket_win.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_WIN_H_ 5 #ifndef NET_UDP_UDP_SOCKET_WIN_H_
6 #define NET_UDP_UDP_SOCKET_WIN_H_ 6 #define NET_UDP_UDP_SOCKET_WIN_H_
7 7
8 #include <qos2.h> 8 #include <qos2.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <winsock2.h> 10 #include <winsock2.h>
11 11
12 #include <memory> 12 #include <memory>
13 13
14 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/threading/non_thread_safe.h" 17 #include "base/threading/non_thread_safe.h"
18 #include "base/win/object_watcher.h" 18 #include "base/win/object_watcher.h"
19 #include "base/win/scoped_handle.h" 19 #include "base/win/scoped_handle.h"
20 #include "net/base/address_family.h" 20 #include "net/base/address_family.h"
21 #include "net/base/completion_callback.h" 21 #include "net/base/completion_callback.h"
22 #include "net/base/io_buffer.h" 22 #include "net/base/io_buffer.h"
23 #include "net/base/ip_endpoint.h" 23 #include "net/base/ip_endpoint.h"
24 #include "net/base/net_export.h" 24 #include "net/base/net_export.h"
25 #include "net/base/network_change_notifier.h" 25 #include "net/base/network_change_notifier.h"
26 #include "net/base/rand_callback.h" 26 #include "net/base/rand_callback.h"
27 #include "net/log/net_log.h" 27 #include "net/log/net_log_with_source.h"
28 #include "net/udp/datagram_socket.h" 28 #include "net/udp/datagram_socket.h"
29 #include "net/udp/diff_serv_code_point.h" 29 #include "net/udp/diff_serv_code_point.h"
30 30
31 namespace net { 31 namespace net {
32 32
33 class IPAddress; 33 class IPAddress;
34 class NetLog;
35 struct NetLogSource;
34 36
35 class NET_EXPORT UDPSocketWin 37 class NET_EXPORT UDPSocketWin
36 : NON_EXPORTED_BASE(public base::NonThreadSafe), 38 : NON_EXPORTED_BASE(public base::NonThreadSafe),
37 NON_EXPORTED_BASE(public base::win::ObjectWatcher::Delegate) { 39 NON_EXPORTED_BASE(public base::win::ObjectWatcher::Delegate) {
38 public: 40 public:
39 UDPSocketWin(DatagramSocket::BindType bind_type, 41 UDPSocketWin(DatagramSocket::BindType bind_type,
40 const RandIntCallback& rand_int_cb, 42 const RandIntCallback& rand_int_cb,
41 net::NetLog* net_log, 43 net::NetLog* net_log,
42 const net::NetLog::Source& source); 44 const net::NetLogSource& source);
43 ~UDPSocketWin() override; 45 ~UDPSocketWin() override;
44 46
45 // Opens the socket. 47 // Opens the socket.
46 // Returns a net error code. 48 // Returns a net error code.
47 int Open(AddressFamily address_family); 49 int Open(AddressFamily address_family);
48 50
49 // Binds this socket to |network|. All data traffic on the socket will be sent 51 // Binds this socket to |network|. All data traffic on the socket will be sent
50 // and received via |network|. Must be called before Connect(). This call will 52 // and received via |network|. Must be called before Connect(). This call will
51 // fail if |network| has disconnected. Communication using this socket will 53 // fail if |network| has disconnected. Communication using this socket will
52 // fail if |network| disconnects. 54 // fail if |network| disconnects.
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 SetFlowFn set_flow_func_; 381 SetFlowFn set_flow_func_;
380 382
381 FRIEND_TEST_ALL_PREFIXES(UDPSocketTest, SetDSCPFake); 383 FRIEND_TEST_ALL_PREFIXES(UDPSocketTest, SetDSCPFake);
382 DISALLOW_COPY_AND_ASSIGN(QwaveAPI); 384 DISALLOW_COPY_AND_ASSIGN(QwaveAPI);
383 }; 385 };
384 386
385 387
386 } // namespace net 388 } // namespace net
387 389
388 #endif // NET_UDP_UDP_SOCKET_WIN_H_ 390 #endif // NET_UDP_UDP_SOCKET_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698