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

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

Issue 2695593009: Use the location where FileDescriptorWatcher is created to track the libevent handlers (Closed)
Patch Set: fix mac. Created 3 years, 10 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
« no previous file with comments | « net/socket/socket_posix.cc ('k') | ui/events/ozone/device/udev/device_manager_udev.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/socket/udp_socket_posix.h" 5 #include "net/socket/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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 net::NetLog* net_log, 155 net::NetLog* net_log,
156 const net::NetLogSource& source) 156 const net::NetLogSource& source)
157 : socket_(kInvalidSocket), 157 : socket_(kInvalidSocket),
158 addr_family_(0), 158 addr_family_(0),
159 is_connected_(false), 159 is_connected_(false),
160 socket_options_(SOCKET_OPTION_MULTICAST_LOOP), 160 socket_options_(SOCKET_OPTION_MULTICAST_LOOP),
161 multicast_interface_(0), 161 multicast_interface_(0),
162 multicast_time_to_live_(1), 162 multicast_time_to_live_(1),
163 bind_type_(bind_type), 163 bind_type_(bind_type),
164 rand_int_cb_(rand_int_cb), 164 rand_int_cb_(rand_int_cb),
165 read_socket_watcher_(FROM_HERE),
166 write_socket_watcher_(FROM_HERE),
165 read_watcher_(this), 167 read_watcher_(this),
166 write_watcher_(this), 168 write_watcher_(this),
167 read_buf_len_(0), 169 read_buf_len_(0),
168 recv_from_address_(NULL), 170 recv_from_address_(NULL),
169 write_buf_len_(0), 171 write_buf_len_(0),
170 net_log_(NetLogWithSource::Make(net_log, NetLogSourceType::UDP_SOCKET)), 172 net_log_(NetLogWithSource::Make(net_log, NetLogSourceType::UDP_SOCKET)),
171 bound_network_(NetworkChangeNotifier::kInvalidNetworkHandle) { 173 bound_network_(NetworkChangeNotifier::kInvalidNetworkHandle) {
172 net_log_.BeginEvent(NetLogEventType::SOCKET_ALIVE, 174 net_log_.BeginEvent(NetLogEventType::SOCKET_ALIVE,
173 source.ToEventParametersCallback()); 175 source.ToEventParametersCallback());
174 if (bind_type == DatagramSocket::RANDOM_BIND) 176 if (bind_type == DatagramSocket::RANDOM_BIND)
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 return MapSystemError(errno); 965 return MapSystemError(errno);
964 966
965 return OK; 967 return OK;
966 } 968 }
967 969
968 void UDPSocketPosix::DetachFromThread() { 970 void UDPSocketPosix::DetachFromThread() {
969 base::NonThreadSafe::DetachFromThread(); 971 base::NonThreadSafe::DetachFromThread();
970 } 972 }
971 973
972 } // namespace net 974 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socket_posix.cc ('k') | ui/events/ozone/device/udev/device_manager_udev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698