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

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

Issue 303026: Refactor: Change the interface HostResolver::DisableIPv6() to HostResolver::SetDefaultA... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Add another comment by the switch Created 11 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 | « chrome/common/chrome_switches.cc ('k') | net/base/host_resolver_impl.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_HOST_RESOLVER_H_ 5 #ifndef NET_BASE_HOST_RESOLVER_H_
6 #define NET_BASE_HOST_RESOLVER_H_ 6 #define NET_BASE_HOST_RESOLVER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Unregisters an observer previously added by AddObserver(). 141 // Unregisters an observer previously added by AddObserver().
142 virtual void RemoveObserver(Observer* observer) = 0; 142 virtual void RemoveObserver(Observer* observer) = 0;
143 143
144 // Returns the host cache, or NULL if this implementation does not use 144 // Returns the host cache, or NULL if this implementation does not use
145 // a HostCache. 145 // a HostCache.
146 virtual HostCache* GetHostCache() = 0; 146 virtual HostCache* GetHostCache() = 0;
147 147
148 // TODO(eroman): temp hack for http://crbug.com/18373 148 // TODO(eroman): temp hack for http://crbug.com/18373
149 virtual void Shutdown() = 0; 149 virtual void Shutdown() = 0;
150 150
151 // Disables or enables support for IPv6 results. 151 // Sets the default AddressFamily to use when requests have left it
152 virtual void DisableIPv6(bool disable_ipv6) {} 152 // unspecified. For example, this could be used to restrict resolution
153 // results to AF_INET by passing in ADDRESS_FAMILY_IPV4, or to
154 // AF_INET6 by passing in ADDRESS_FAMILY_IPV6.
155 virtual void SetDefaultAddressFamily(AddressFamily address_family) {}
153 156
154 protected: 157 protected:
155 HostResolver() { } 158 HostResolver() { }
156 159
157 private: 160 private:
158 DISALLOW_COPY_AND_ASSIGN(HostResolver); 161 DISALLOW_COPY_AND_ASSIGN(HostResolver);
159 }; 162 };
160 163
161 // This class represents the task of resolving a hostname (or IP address 164 // This class represents the task of resolving a hostname (or IP address
162 // literal) to an AddressList object. It wraps HostResolver to resolve only a 165 // literal) to an AddressList object. It wraps HostResolver to resolve only a
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 }; 199 };
197 200
198 // Creates a HostResolver implementation that queries the underlying system. 201 // Creates a HostResolver implementation that queries the underlying system.
199 // (Except if a unit-test has changed the global HostResolverProc using 202 // (Except if a unit-test has changed the global HostResolverProc using
200 // ScopedHostResolverProc to intercept requests to the system). 203 // ScopedHostResolverProc to intercept requests to the system).
201 HostResolver* CreateSystemHostResolver(); 204 HostResolver* CreateSystemHostResolver();
202 205
203 } // namespace net 206 } // namespace net
204 207
205 #endif // NET_BASE_HOST_RESOLVER_H_ 208 #endif // NET_BASE_HOST_RESOLVER_H_
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | net/base/host_resolver_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698