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

Unified Diff: net/base/host_resolver_impl.h

Issue 1006001: Refine IPv6 probe to require that the client has an IPv6 address on an interf... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | net/base/host_resolver_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_resolver_impl.h
===================================================================
--- net/base/host_resolver_impl.h (revision 41742)
+++ net/base/host_resolver_impl.h (working copy)
@@ -89,10 +89,13 @@
virtual void AddObserver(HostResolver::Observer* observer);
virtual void RemoveObserver(HostResolver::Observer* observer);
- virtual void SetDefaultAddressFamily(AddressFamily address_family) {
- default_address_family_ = address_family;
- }
+ // Set address family, and disable IPv6 probe support.
+ virtual void SetDefaultAddressFamily(AddressFamily address_family);
+ // Continuously observe whether IPv6 is supported, and set the allowable
+ // address family to IPv4 iff IPv6 is not supported.
+ void ProbeIPv6Support();
+
virtual HostResolverImpl* GetAsHostResolverImpl() { return this; }
// TODO(eroman): hack for http://crbug.com/15513
@@ -130,6 +133,7 @@
private:
class Job;
class JobPool;
+ class IPv6ProbeJob;
class Request;
class RequestsTrace;
typedef std::vector<Request*> RequestsList;
@@ -179,6 +183,12 @@
// NetworkChangeNotifier::Observer methods:
virtual void OnIPAddressChanged();
+ // Notify IPv6ProbeJob not to call back, and discard reference to the job.
+ void DiscardIPv6ProbeJob();
+
+ // Callback from IPv6 probe activity.
+ void IPv6ProbeSetDefaultAddressFamily(AddressFamily address_family);
+
// Returns true if the constraints for |pool| are met, and a new job can be
// created for this pool.
bool CanCreateJobForPool(const JobPool& pool) const;
@@ -247,6 +257,14 @@
scoped_refptr<RequestsTrace> requests_trace_;
+ // Indicate if probing is done after each network change event to set address
+ // family.
+ // When false, explicit setting of address family is used.
+ bool ipv6_probe_monitoring_;
+
+ // The last un-cancelled IPv6ProbeJob (if any).
+ scoped_refptr<IPv6ProbeJob> ipv6_probe_job_;
+
DISALLOW_COPY_AND_ASSIGN(HostResolverImpl);
};
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | net/base/host_resolver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698