diff options
author | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-27 16:35:26 +0000 |
---|---|---|
committer | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-27 16:35:26 +0000 |
commit | 0f86277de42193b543d0b33e4c82c750f0642141 (patch) | |
tree | 58b2076b92aa4f6ba0f15a7070ab408b8e637f62 | |
parent | 66ca9af0f309c6bf792523bac9434401c4039f14 (diff) | |
download | chromium_src-0f86277de42193b543d0b33e4c82c750f0642141.zip chromium_src-0f86277de42193b543d0b33e4c82c750f0642141.tar.gz chromium_src-0f86277de42193b543d0b33e4c82c750f0642141.tar.bz2 |
Remove --testing-fixed-http-port and --testing-fixed-https-port.
--host-rules seems like a reasonable enough substitute for these two command line flags, and removing them will simplifies the fairly complicated URL rewrite logic in HttpNetworkTransaction.
BUG=None
TEST=built and ran net_unittests
Review URL: http://codereview.chromium.org/3041019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53790 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser_main.cc | 10 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 4 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 2 | ||||
-rw-r--r-- | net/http/http_network_session.cc | 23 | ||||
-rw-r--r-- | net/http/http_network_session.h | 6 | ||||
-rw-r--r-- | net/http/http_network_transaction.cc | 8 | ||||
-rw-r--r-- | net/spdy/spdy_network_transaction.cc | 9 |
7 files changed, 0 insertions, 62 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index aaeeb08..acda12e 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -415,16 +415,6 @@ void InitializeNetworkOptions(const CommandLine& parsed_command_line) { net::CookieMonster::EnableFileScheme(); } - if (parsed_command_line.HasSwitch(switches::kFixedHttpPort)) { - net::HttpNetworkSession::set_fixed_http_port(StringToInt( - parsed_command_line.GetSwitchValueASCII(switches::kFixedHttpPort))); - } - - if (parsed_command_line.HasSwitch(switches::kFixedHttpsPort)) { - net::HttpNetworkSession::set_fixed_https_port(StringToInt( - parsed_command_line.GetSwitchValueASCII(switches::kFixedHttpsPort))); - } - if (parsed_command_line.HasSwitch(switches::kIgnoreCertificateErrors)) net::HttpNetworkTransaction::IgnoreCertificateErrors(true); diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 132f460..e4f818d 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -930,10 +930,6 @@ const char kUninstall[] = "uninstall"; // This is a temporary testing flag. const char kUseSpdy[] = "use-spdy"; -// 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"; - // Ignore certificate related errors. const char kIgnoreCertificateErrors[] = "ignore-certificate-errors"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 3948747..d77ed2c 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -267,8 +267,6 @@ extern const char kTrustedPlugins[]; extern const char kTryChromeAgain[]; extern const char kUninstall[]; extern const char kUseSpdy[]; -extern const char kFixedHttpPort[]; -extern const char kFixedHttpsPort[]; extern const char kIgnoreCertificateErrors[]; extern const char kMaxSpdySessionsPerDomain[]; extern const char kUseLowFragHeapCrt[]; diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc index 971786a..05690af 100644 --- a/net/http/http_network_session.cc +++ b/net/http/http_network_session.cc @@ -30,9 +30,6 @@ int g_max_sockets_per_group = 6; // http://crbug.com/44501 for details about proxy server connection limits. int g_max_sockets_per_proxy_server = 32; -uint16 g_fixed_http_port = 0; -uint16 g_fixed_https_port = 0; - } // namespace HttpNetworkSession::HttpNetworkSession( @@ -148,24 +145,4 @@ void HttpNetworkSession::set_max_sockets_per_group(int socket_count) { g_max_sockets_per_group = socket_count; } -// static -uint16 HttpNetworkSession::fixed_http_port() { - return g_fixed_http_port; -} - -// static -void HttpNetworkSession::set_fixed_http_port(uint16 port) { - g_fixed_http_port = port; -} - -// static -uint16 HttpNetworkSession::fixed_https_port() { - return g_fixed_https_port; -} - -// static -void HttpNetworkSession::set_fixed_https_port(uint16 port) { - g_fixed_https_port = port; -} - } // namespace net diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h index 98baae1..b1c269d 100644 --- a/net/http/http_network_session.h +++ b/net/http/http_network_session.h @@ -103,12 +103,6 @@ class HttpNetworkSession : public base::RefCounted<HttpNetworkSession>, static void set_max_sockets_per_group(int socket_count); - static uint16 fixed_http_port(); - static void set_fixed_http_port(uint16 port); - - static uint16 fixed_https_port(); - static void set_fixed_https_port(uint16 port); - #ifdef UNIT_TEST void FlushSocketPools() { if (ssl_socket_pool_.get()) diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index ae1e86f..749ab33 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -733,14 +733,6 @@ int HttpNetworkTransaction::DoInitConnection() { using_spdy_ = false; response_.was_fetched_via_proxy = !proxy_info_.is_direct(); - // Use the fixed testing ports if they've been provided. - if (using_ssl_) { - if (session_->fixed_https_port() != 0) - endpoint_.set_port(session_->fixed_https_port()); - } else if (session_->fixed_http_port() != 0) { - endpoint_.set_port(session_->fixed_http_port()); - } - // Check first if we have a spdy session for this group. If so, then go // straight to using that. if (session_->spdy_session_pool()->HasSession(endpoint_)) { diff --git a/net/spdy/spdy_network_transaction.cc b/net/spdy/spdy_network_transaction.cc index fa8ba58..6e0c930 100644 --- a/net/spdy/spdy_network_transaction.cc +++ b/net/spdy/spdy_network_transaction.cc @@ -221,15 +221,6 @@ int SpdyNetworkTransaction::DoInitConnection() { std::string host = request_->url.HostNoBrackets(); int port = request_->url.EffectiveIntPort(); - // Use the fixed testing ports if they've been provided. This is useful for - // debugging. - if (SpdySession::SSLMode()) { - if (session_->fixed_https_port() != 0) - port = session_->fixed_https_port(); - } else if (session_->fixed_http_port() != 0) { - port = session_->fixed_http_port(); - } - std::string connection_group = "spdy."; HostPortPair host_port_pair(host, port); connection_group.append(host_port_pair.ToString()); |