diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-18 23:06:27 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-18 23:06:27 +0000 |
commit | 9f651d04dd719ecfafe9dfbee4c742879edf4fca (patch) | |
tree | 988810f9fd860c0c42943b549f3ddd04e290e9d4 /chrome | |
parent | fcbff851ba11ef0b8c26344c47a07037d782f436 (diff) | |
download | chromium_src-9f651d04dd719ecfafe9dfbee4c742879edf4fca.zip chromium_src-9f651d04dd719ecfafe9dfbee4c742879edf4fca.tar.gz chromium_src-9f651d04dd719ecfafe9dfbee4c742879edf4fca.tar.bz2 |
Remove the command line flag --testing-fixed-host.
This has been superceded by --host-resolver-rules.
(Instead of --testing-fixed-host="foobar" one would use --host-resolver-rules="MAP * foobar")
BUG=36053
Review URL: http://codereview.chromium.org/647005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39393 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/io_thread.cc | 16 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 11 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 |
3 files changed, 3 insertions, 25 deletions
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc index 1aafdf4..4ee6814 100644 --- a/chrome/browser/io_thread.cc +++ b/chrome/browser/io_thread.cc @@ -50,25 +50,15 @@ net::HostResolver* CreateGlobalHostResolver( global_host_resolver->SetDefaultAddressFamily(net::ADDRESS_FAMILY_IPV4); } - std::string hostname_remappings; - - if (command_line.HasSwitch(switches::kFixedHost)) { - std::string host = - command_line.GetSwitchValueASCII(switches::kFixedHost); - hostname_remappings = StringPrintf("MAP * %s", host.c_str()); - } else if (command_line.HasSwitch(switches::kHostResolverRules)) { - hostname_remappings = - command_line.GetSwitchValueASCII(switches::kHostResolverRules); - } - // If hostname remappings were specified on the command-line, layer these // rules on top of the real host resolver. This allows forwarding all requests // through a designated test server. - if (!hostname_remappings.empty()) { + if (command_line.HasSwitch(switches::kHostResolverRules)) { net::MappedHostResolver* remapped_resolver = new net::MappedHostResolver(global_host_resolver); global_host_resolver = remapped_resolver; - remapped_resolver->SetRulesFromString(hostname_remappings); + remapped_resolver->SetRulesFromString( + command_line.GetSwitchValueASCII(switches::kHostResolverRules)); } return global_host_resolver; diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 0f41903..36002c7 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -670,17 +670,6 @@ const char kUninstall[] = "uninstall"; // This is a temporary testing flag. const char kUseSpdy[] = "use-spdy"; -// Force all requests to go to this server. This commandline is provided -// for testing purposes only, and will likely be removed soon. It can also -// hurt startup performance as it does a synchronous name resolution on the -// UI thread. -// The host resolution using this scheme is done exactly once at startup. -// From that point on, it is completely a static configuration. -// TODO(mbelshe): Remove this flag when testing is complete. -// --testing-fixed-host=myserver -// TODO(eroman): Can this be replaced by host-resolver-rules ? -const char kFixedHost[] = "testing-fixed-host"; - // These two flags are used to force http and https requests to fixed ports. const char kFixedHttpPort[] = "testing-fixed-http-port"; const char kFixedHttpsPort[] = "testing-fixed-https-port"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index e311e1a..7fb39bb 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -191,7 +191,6 @@ extern const char kTrustedPlugins[]; extern const char kTryChromeAgain[]; extern const char kUninstall[]; extern const char kUseSpdy[]; -extern const char kFixedHost[]; extern const char kFixedHttpPort[]; extern const char kFixedHttpsPort[]; extern const char kUseLowFragHeapCrt[]; |