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

Side by Side Diff: tools/android/fake_dns/fake_dns.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 | « tools/android/common/daemon.cc ('k') | tools/android/forwarder/forwarder.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 <arpa/inet.h> 5 #include <arpa/inet.h>
6 #include <errno.h> 6 #include <errno.h>
7 #include <netinet/in.h> 7 #include <netinet/in.h>
8 #include <signal.h> 8 #include <signal.h>
9 #include <stdio.h> 9 #include <stdio.h>
10 #include <stdlib.h> 10 #include <stdlib.h>
11 #include <string.h> 11 #include <string.h>
12 #include <sys/socket.h> 12 #include <sys/socket.h>
13 #include <sys/types.h> 13 #include <sys/types.h>
14 #include <unistd.h> 14 #include <unistd.h>
15 15
16 #include <string> 16 #include <string>
17 17
18 #include "base/basictypes.h" 18 #include "base/basictypes.h"
19 #include "base/command_line.h" 19 #include "base/command_line.h"
20 #include "base/eintr_wrapper.h"
21 #include "base/logging.h" 20 #include "base/logging.h"
21 #include "base/posix/eintr_wrapper.h"
22 #include "base/safe_strerror_posix.h" 22 #include "base/safe_strerror_posix.h"
23 #include "net/base/big_endian.h" 23 #include "net/base/big_endian.h"
24 #include "net/base/net_util.h" 24 #include "net/base/net_util.h"
25 #include "net/dns/dns_protocol.h" 25 #include "net/dns/dns_protocol.h"
26 #include "tools/android/common/daemon.h" 26 #include "tools/android/common/daemon.h"
27 #include "tools/android/common/net.h" 27 #include "tools/android/common/net.h"
28 28
29 namespace { 29 namespace {
30 30
31 // Mininum request size: 1 question containing 1 QNAME, 1 TYPE and 1 CLASS. 31 // Mininum request size: 1 question containing 1 QNAME, 1 TYPE and 1 CLASS.
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 LOG(ERROR) << "Failed to receive a request: " << strerror(errno); 229 LOG(ERROR) << "Failed to receive a request: " << strerror(errno);
230 CloseFileDescriptor(sock); 230 CloseFileDescriptor(sock);
231 return 1; 231 return 1;
232 } 232 }
233 233
234 if (size > 0) 234 if (size > 0)
235 HandleRequest(sock, request, size, client_addr); 235 HandleRequest(sock, request, size, client_addr);
236 } 236 }
237 } 237 }
238 238
OLDNEW
« no previous file with comments | « tools/android/common/daemon.cc ('k') | tools/android/forwarder/forwarder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698