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

Side by Side Diff: net/udp/udp_socket_posix.cc

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 #include "net/udp/udp_socket_posix.h" 5 #include "net/udp/udp_socket_posix.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <net/if.h> 9 #include <net/if.h>
10 #include <netdb.h> 10 #include <netdb.h>
(...skipping 11 matching lines...) Expand all
22 #include "base/rand_util.h" 22 #include "base/rand_util.h"
23 #include "base/trace_event/trace_event.h" 23 #include "base/trace_event/trace_event.h"
24 #include "net/base/io_buffer.h" 24 #include "net/base/io_buffer.h"
25 #include "net/base/ip_address.h" 25 #include "net/base/ip_address.h"
26 #include "net/base/ip_endpoint.h" 26 #include "net/base/ip_endpoint.h"
27 #include "net/base/net_errors.h" 27 #include "net/base/net_errors.h"
28 #include "net/base/network_activity_monitor.h" 28 #include "net/base/network_activity_monitor.h"
29 #include "net/base/sockaddr_storage.h" 29 #include "net/base/sockaddr_storage.h"
30 #include "net/log/net_log.h" 30 #include "net/log/net_log.h"
31 #include "net/log/net_log_event_type.h" 31 #include "net/log/net_log_event_type.h"
32 #include "net/log/net_log_source.h"
32 #include "net/log/net_log_source_type.h" 33 #include "net/log/net_log_source_type.h"
33 #include "net/socket/socket_descriptor.h" 34 #include "net/socket/socket_descriptor.h"
34 #include "net/udp/udp_net_log_parameters.h" 35 #include "net/udp/udp_net_log_parameters.h"
35 36
36 #if defined(OS_ANDROID) 37 #if defined(OS_ANDROID)
37 #include <dlfcn.h> 38 #include <dlfcn.h>
38 // This was added in Lollipop to dlfcn.h 39 // This was added in Lollipop to dlfcn.h
39 #define RTLD_NOLOAD 4 40 #define RTLD_NOLOAD 4
40 #include "base/android/build_info.h" 41 #include "base/android/build_info.h"
41 #include "base/native_library.h" 42 #include "base/native_library.h"
(...skipping 27 matching lines...) Expand all
69 return OK; 70 return OK;
70 } 71 }
71 72
72 #endif // OS_MACOSX 73 #endif // OS_MACOSX
73 74
74 } // namespace 75 } // namespace
75 76
76 UDPSocketPosix::UDPSocketPosix(DatagramSocket::BindType bind_type, 77 UDPSocketPosix::UDPSocketPosix(DatagramSocket::BindType bind_type,
77 const RandIntCallback& rand_int_cb, 78 const RandIntCallback& rand_int_cb,
78 net::NetLog* net_log, 79 net::NetLog* net_log,
79 const net::NetLog::Source& source) 80 const net::NetLogSource& source)
80 : socket_(kInvalidSocket), 81 : socket_(kInvalidSocket),
81 addr_family_(0), 82 addr_family_(0),
82 is_connected_(false), 83 is_connected_(false),
83 socket_options_(SOCKET_OPTION_MULTICAST_LOOP), 84 socket_options_(SOCKET_OPTION_MULTICAST_LOOP),
84 multicast_interface_(0), 85 multicast_interface_(0),
85 multicast_time_to_live_(1), 86 multicast_time_to_live_(1),
86 bind_type_(bind_type), 87 bind_type_(bind_type),
87 rand_int_cb_(rand_int_cb), 88 rand_int_cb_(rand_int_cb),
88 read_watcher_(this), 89 read_watcher_(this),
89 write_watcher_(this), 90 write_watcher_(this),
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 return MapSystemError(errno); 874 return MapSystemError(errno);
874 875
875 return OK; 876 return OK;
876 } 877 }
877 878
878 void UDPSocketPosix::DetachFromThread() { 879 void UDPSocketPosix::DetachFromThread() {
879 base::NonThreadSafe::DetachFromThread(); 880 base::NonThreadSafe::DetachFromThread();
880 } 881 }
881 882
882 } // namespace net 883 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698