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

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

Issue 11366229: Move eintr_wrapper.h from base to base/posix (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « net/socket/tcp_server_socket_libevent.cc ('k') | net/udp/udp_socket_win.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/udp/udp_socket_libevent.h" 5 #include "net/udp/udp_socket_libevent.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <netdb.h> 9 #include <netdb.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/eintr_wrapper.h"
14 #include "base/logging.h" 13 #include "base/logging.h"
15 #include "base/message_loop.h" 14 #include "base/message_loop.h"
16 #include "base/metrics/stats_counters.h" 15 #include "base/metrics/stats_counters.h"
16 #include "base/posix/eintr_wrapper.h"
17 #include "base/rand_util.h" 17 #include "base/rand_util.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_errors.h" 20 #include "net/base/net_errors.h"
21 #include "net/base/net_log.h" 21 #include "net/base/net_log.h"
22 #include "net/base/net_util.h" 22 #include "net/base/net_util.h"
23 #include "net/udp/udp_net_log_parameters.h" 23 #include "net/udp/udp_net_log_parameters.h"
24 #if defined(OS_POSIX) 24 #if defined(OS_POSIX)
25 #include <netinet/in.h> 25 #include <netinet/in.h>
26 #endif 26 #endif
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 501
502 for (int i = 0; i < kBindRetries; ++i) { 502 for (int i = 0; i < kBindRetries; ++i) {
503 int rv = DoBind(IPEndPoint(ip, rand_int_cb_.Run(kPortStart, kPortEnd))); 503 int rv = DoBind(IPEndPoint(ip, rand_int_cb_.Run(kPortStart, kPortEnd)));
504 if (rv == OK || rv != ERR_ADDRESS_IN_USE) 504 if (rv == OK || rv != ERR_ADDRESS_IN_USE)
505 return rv; 505 return rv;
506 } 506 }
507 return DoBind(IPEndPoint(ip, 0)); 507 return DoBind(IPEndPoint(ip, 0));
508 } 508 }
509 509
510 } // namespace net 510 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/tcp_server_socket_libevent.cc ('k') | net/udp/udp_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698