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

Unified Diff: chrome/browser/net/dns_global.cc

Issue 302010: Add a mechanism to disable IPv6.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address darin's comments Created 11 years, 2 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 | « no previous file | chrome/common/chrome_switches.h » ('j') | net/base/host_resolver_impl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/dns_global.cc
===================================================================
--- chrome/browser/net/dns_global.cc (revision 29420)
+++ chrome/browser/net/dns_global.cc (working copy)
@@ -22,7 +22,9 @@
#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
+#include "chrome/common/chrome_switches.h"
#include "net/base/host_resolver.h"
+#include "net/base/host_resolver_impl.h"
using base::Time;
using base::TimeDelta;
@@ -477,6 +479,9 @@
// Called from UI thread.
if (!global_host_resolver) {
global_host_resolver = net::CreateSystemHostResolver();
+
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableIPv6))
+ global_host_resolver->DisableIPv6(true);
}
return global_host_resolver;
}
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | net/base/host_resolver_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698