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

Side by Side Diff: net/base/address_family.h

Issue 3231005: Fix remaining localhost resolution issues. (Closed)
Patch Set: Fix mock resolver to ignore network config-induced host resolver flags when using default flags. Created 10 years, 3 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 | « no previous file | net/base/host_resolver_impl.cc » ('j') | net/base/host_resolver_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef NET_BASE_ADDRESS_FAMILY_H_ 5 #ifndef NET_BASE_ADDRESS_FAMILY_H_
6 #define NET_BASE_ADDRESS_FAMILY_H_ 6 #define NET_BASE_ADDRESS_FAMILY_H_
7 #pragma once 7 #pragma once
8 8
9 namespace net { 9 namespace net {
10 10
11 // Enum wrapper around the address family types supported by host resolver 11 // Enum wrapper around the address family types supported by host resolver
12 // procedures. 12 // procedures.
13 enum AddressFamily { 13 enum AddressFamily {
14 ADDRESS_FAMILY_UNSPECIFIED, // AF_UNSPEC 14 ADDRESS_FAMILY_UNSPECIFIED, // AF_UNSPEC
15 ADDRESS_FAMILY_IPV4, // AF_INET 15 ADDRESS_FAMILY_IPV4, // AF_INET
16 ADDRESS_FAMILY_IPV6, // AF_INET6 16 ADDRESS_FAMILY_IPV6, // AF_INET6
17 }; 17 };
18 18
19 // HostResolverFlags is a bitflag enum used by host resolver procedures to 19 // HostResolverFlags is a bitflag enum used by host resolver procedures to
20 // determine the value of addrinfo.ai_flags. 20 // determine the value of addrinfo.ai_flags.
21 enum { 21 enum {
22 HOST_RESOLVER_CANONNAME = 1 << 0, // AI_CANONNAME 22 HOST_RESOLVER_CANONNAME = 1 << 0, // AI_CANONNAME
23 // Hint to the resolver proc that only loopback addresses are configured. 23 // Hint to the resolver proc that only loopback addresses are configured.
24 HOST_RESOLVER_LOOPBACK_ONLY = 1 << 1, 24 HOST_RESOLVER_LOOPBACK_ONLY = 1 << 1,
25 // Indicate the address family was set because no IPv6 support was detected.
26 HOST_RESOLVER_DEFAULT_FAMILY_SET_DUE_TO_NO_IPV6 = 1 << 2,
willchan no longer on Chromium 2010/09/03 20:23:07 Is this flag an abuse of HostResolverFlags? It do
vandebo (ex-Chrome) 2010/09/03 20:33:43 The flags do determine addrinfo.ai_flags, though t
25 }; 27 };
26 typedef int HostResolverFlags; 28 typedef int HostResolverFlags;
27 29
28 } // namespace net 30 } // namespace net
29 31
30 #endif // NET_BASE_ADDRESS_FAMILY_H_ 32 #endif // NET_BASE_ADDRESS_FAMILY_H_
OLDNEW
« no previous file with comments | « no previous file | net/base/host_resolver_impl.cc » ('j') | net/base/host_resolver_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698