summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-12 22:47:14 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-12 22:47:14 +0000
commitb6a50183e21e21207f2dff4953d19aa5be62d166 (patch)
tree9a937074af7bb0c5ff9c1987f68a4055bb54762c /chrome/browser/browser_main.cc
parent6402aaec3c045969b60ef7b782ce25992d07a70f (diff)
downloadchromium_src-b6a50183e21e21207f2dff4953d19aa5be62d166.zip
chromium_src-b6a50183e21e21207f2dff4953d19aa5be62d166.tar.gz
chromium_src-b6a50183e21e21207f2dff4953d19aa5be62d166.tar.bz2
Add --host-rules support.
The format for --host-rules is identical to --host-resolver-rules. The difference is that --host-rules affects the endpoint of the HttpNetworkTransaction, not just the host resolver. So, this means the host passed to the host resolver and the TCP connect(), the tunnel CONNECT, and the SOCKS connect will be different. Review URL: http://codereview.chromium.org/2057007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47083 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r--chrome/browser/browser_main.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 137b92ae..c32e0d1 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -367,6 +367,10 @@ void InitializeNetworkOptions(const CommandLine& parsed_command_line) {
if (parsed_command_line.HasSwitch(switches::kIgnoreCertificateErrors))
net::HttpNetworkTransaction::IgnoreCertificateErrors(true);
+ if (parsed_command_line.HasSwitch(switches::kHostRules))
+ net::HttpNetworkTransaction::SetHostMappingRules(
+ parsed_command_line.GetSwitchValueASCII(switches::kHostRules));
+
if (parsed_command_line.HasSwitch(switches::kMaxSpdySessionsPerDomain)) {
int value = StringToInt(
parsed_command_line.GetSwitchValueASCII(