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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 573004: A brief test of whether we can safely disable ipv6. Will rollback asap.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 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 #include "chrome/browser/io_thread.h" 5 #include "chrome/browser/io_thread.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/leak_tracker.h" 7 #include "base/leak_tracker.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chrome_thread.h" 10 #include "chrome/browser/chrome_thread.h"
(...skipping 18 matching lines...) Expand all
29 // The FixedHostResolver allows us to send all network requests through 29 // The FixedHostResolver allows us to send all network requests through
30 // a designated test server. 30 // a designated test server.
31 if (command_line.HasSwitch(switches::kFixedHost)) { 31 if (command_line.HasSwitch(switches::kFixedHost)) {
32 std::string host = 32 std::string host =
33 command_line.GetSwitchValueASCII(switches::kFixedHost); 33 command_line.GetSwitchValueASCII(switches::kFixedHost);
34 global_host_resolver = new net::FixedHostResolver(host); 34 global_host_resolver = new net::FixedHostResolver(host);
35 } else { 35 } else {
36 global_host_resolver = 36 global_host_resolver =
37 net::CreateSystemHostResolver(network_change_notifier); 37 net::CreateSystemHostResolver(network_change_notifier);
38 38
39 if (command_line.HasSwitch(switches::kDisableIPv6)) 39 // if (command_line.HasSwitch(switches::kDisableIPv6))
40 global_host_resolver->SetDefaultAddressFamily(net::ADDRESS_FAMILY_IPV4); 40 global_host_resolver->SetDefaultAddressFamily(net::ADDRESS_FAMILY_IPV4);
41 } 41 }
42 42
43 return global_host_resolver; 43 return global_host_resolver;
44 } 44 }
45 45
46 } // namespace 46 } // namespace
47 47
48 // The IOThread object must outlive any tasks posted to the IO thread before the 48 // The IOThread object must outlive any tasks posted to the IO thread before the
49 // Quit task. 49 // Quit task.
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 // Clear the host cache to avoid showing entries from the OTR session 185 // Clear the host cache to avoid showing entries from the OTR session
186 // in about:net-internals. 186 // in about:net-internals.
187 if (globals_->host_resolver->IsHostResolverImpl()) { 187 if (globals_->host_resolver->IsHostResolverImpl()) {
188 net::HostCache* host_cache = static_cast<net::HostResolverImpl*>( 188 net::HostCache* host_cache = static_cast<net::HostResolverImpl*>(
189 globals_->host_resolver.get())->cache(); 189 globals_->host_resolver.get())->cache();
190 if (host_cache) 190 if (host_cache)
191 host_cache->clear(); 191 host_cache->clear();
192 } 192 }
193 } 193 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698