OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/sync/notifier/base/async_dns_lookup.h" | 5 #include "chrome/common/net/notifier/base/async_dns_lookup.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #if defined(OS_POSIX) | 9 #if defined(OS_POSIX) |
10 #include <arpa/inet.h> | 10 #include <arpa/inet.h> |
11 #include <netdb.h> | 11 #include <netdb.h> |
12 #include <netinet/in_systm.h> | 12 #include <netinet/in_systm.h> |
13 #include <netinet/in.h> | 13 #include <netinet/in.h> |
14 #include <netinet/ip.h> | 14 #include <netinet/ip.h> |
15 #include <sys/socket.h> | 15 #include <sys/socket.h> |
16 #include <sys/types.h> | 16 #include <sys/types.h> |
17 #endif // defined(OS_POSIX) | 17 #endif // defined(OS_POSIX) |
18 | 18 |
19 // Apparently, inet_aton() is available for Windows, but just not | 19 // Apparently, inet_aton() is available for Windows, but just not |
20 // declared anywhere. We'd use inet_pton(), but it's Vista-only. | 20 // declared anywhere. We'd use inet_pton(), but it's Vista-only. |
21 #if defined(OS_WIN) | 21 #if defined(OS_WIN) |
22 int inet_aton(const char* cp, struct in_addr* inp); | 22 int inet_aton(const char* cp, struct in_addr* inp); |
23 #endif // defined(OS_WIN) | 23 #endif // defined(OS_WIN) |
24 | 24 |
25 #include <vector> | 25 #include <vector> |
26 | 26 |
27 #include "base/basictypes.h" | 27 #include "base/basictypes.h" |
28 #include "base/logging.h" | 28 #include "base/logging.h" |
29 #include "chrome/browser/sync/notifier/base/nethelpers.h" | 29 #include "chrome/common/net/notifier/base/nethelpers.h" |
30 #include "talk/base/byteorder.h" | 30 #include "talk/base/byteorder.h" |
31 #include "talk/base/common.h" | 31 #include "talk/base/common.h" |
32 #include "talk/base/socketaddress.h" | 32 #include "talk/base/socketaddress.h" |
33 #include "talk/base/thread.h" | 33 #include "talk/base/thread.h" |
34 | 34 |
35 enum { MSG_TIMEOUT = talk_base::SignalThread::ST_MSG_FIRST_AVAILABLE }; | 35 enum { MSG_TIMEOUT = talk_base::SignalThread::ST_MSG_FIRST_AVAILABLE }; |
36 | 36 |
37 #ifndef WIN32 | 37 #ifndef WIN32 |
38 const int WSAHOST_NOT_FOUND = 11001; // Follows the format in winsock2.h. | 38 const int WSAHOST_NOT_FOUND = 11001; // Follows the format in winsock2.h. |
39 #endif // WIN32 | 39 #endif // WIN32 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // AsyncDNSLookup::DoWork thread doesn't have any locks at this point, and it | 132 // AsyncDNSLookup::DoWork thread doesn't have any locks at this point, and it |
133 // is the only thread being held up by this. | 133 // is the only thread being held up by this. |
134 SignalWorkDone(this); | 134 SignalWorkDone(this); |
135 | 135 |
136 // Ensure that no more "WorkDone" signaling is done. | 136 // Ensure that no more "WorkDone" signaling is done. |
137 // Don't call Release or Destroy since that was already done by the callback. | 137 // Don't call Release or Destroy since that was already done by the callback. |
138 SignalWorkDone.disconnect_all(); | 138 SignalWorkDone.disconnect_all(); |
139 } | 139 } |
140 | 140 |
141 } // namespace notifier | 141 } // namespace notifier |
OLD | NEW |