summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-20 18:15:22 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-20 18:15:22 +0000
commit88212f1acfd9e842eea20849e5c27eded66a492f (patch)
treed7aa9421a0bfb71a087c8201d7ec4ca3d4d2281b /chrome/browser/net
parent1adabe472d0af3524e3d432699bb1fa48757b8e2 (diff)
downloadchromium_src-88212f1acfd9e842eea20849e5c27eded66a492f.zip
chromium_src-88212f1acfd9e842eea20849e5c27eded66a492f.tar.gz
chromium_src-88212f1acfd9e842eea20849e5c27eded66a492f.tar.bz2
Make new FTP the default on Windows. Use the --wininet-ftp
command-line switch to select the old WinInet-based FTP implementation. R=phajdan.jr BUG=http://crbug.com/4965 TEST=none Review URL: http://codereview.chromium.org/173099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23836 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net')
-rw-r--r--chrome/browser/net/chrome_url_request_context.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc
index 891bd82..0aa4fc8 100644
--- a/chrome/browser/net/chrome_url_request_context.cc
+++ b/chrome/browser/net/chrome_url_request_context.cc
@@ -115,8 +115,9 @@ ChromeURLRequestContext* ChromeURLRequestContext::CreateOriginal(
// Global host resolver for the context.
context->host_resolver_ = chrome_browser_net::GetGlobalHostResolver();
- context->proxy_service_ = CreateProxyService(
- context, *CommandLine::ForCurrentProcess());
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+
+ context->proxy_service_ = CreateProxyService(context, command_line);
net::HttpCache* cache =
new net::HttpCache(context->host_resolver_,
@@ -124,7 +125,6 @@ ChromeURLRequestContext* ChromeURLRequestContext::CreateOriginal(
context->ssl_config_service_,
disk_cache_path.ToWStringHack(), cache_size);
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
bool record_mode = chrome::kRecordModeEnabled &&
command_line.HasSwitch(switches::kRecordMode);
bool playback_mode = command_line.HasSwitch(switches::kPlaybackMode);
@@ -137,10 +137,10 @@ ChromeURLRequestContext* ChromeURLRequestContext::CreateOriginal(
}
context->http_transaction_factory_ = cache;
- // The kNewFtp switch is Windows specific because we have multiple FTP
+ // The kWininetFtp switch is Windows specific because we have two FTP
// implementations on Windows.
#if defined(OS_WIN)
- if (command_line.HasSwitch(switches::kNewFtp))
+ if (!command_line.HasSwitch(switches::kWininetFtp))
context->ftp_transaction_factory_ =
new net::FtpNetworkLayer(context->host_resolver_);
#else
@@ -212,11 +212,10 @@ ChromeURLRequestContext* ChromeURLRequestContext::CreateOffTheRecord(
context->ssl_config_service_, 0);
context->cookie_store_ = new net::CookieMonster;
- // The kNewFtp switch is Windows specific because we have multiple FTP
+ // The kWininetFtp switch is Windows specific because we have two FTP
// implementations on Windows.
#if defined(OS_WIN)
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- if (command_line.HasSwitch(switches::kNewFtp))
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kWininetFtp))
context->ftp_transaction_factory_ =
new net::FtpNetworkLayer(context->host_resolver_);
#else