diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-20 18:15:22 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-20 18:15:22 +0000 |
commit | 88212f1acfd9e842eea20849e5c27eded66a492f (patch) | |
tree | d7aa9421a0bfb71a087c8201d7ec4ca3d4d2281b /chrome | |
parent | 1adabe472d0af3524e3d432699bb1fa48757b8e2 (diff) | |
download | chromium_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')
-rw-r--r-- | chrome/browser/net/chrome_url_request_context.cc | 15 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 6 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 2 |
3 files changed, 11 insertions, 12 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 diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 4204e27..3a32417 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -427,10 +427,10 @@ const wchar_t kRendererCmdPrefix[] = L"renderer-cmd-prefix"; // On POSIX only: the contents of this flag are prepended to the utility // process command line. Useful values might be "valgrind" or "xterm -e gdb // --args". -const wchar_t kUtilityCmdPrefix[] = L"utility-cmd-prefix"; +const wchar_t kUtilityCmdPrefix[] = L"utility-cmd-prefix"; -// Temparary option for new ftp implemetation. -const wchar_t kNewFtp[] = L"new-ftp"; +// On Windows only: use the old WinInet-based ftp implemetation. +const wchar_t kWininetFtp[] = L"wininet-ftp"; // Enable Native Web Worker support const wchar_t kEnableNativeWebWorkers[] = L"enable-native-web-workers"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index e3ff1a9..28426be 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -160,7 +160,7 @@ extern const wchar_t kRendererCmdPrefix[]; extern const wchar_t kUtilityCmdPrefix[]; -extern const wchar_t kNewFtp[]; +extern const wchar_t kWininetFtp[]; extern const wchar_t kEnableNativeWebWorkers[]; extern const wchar_t kWebWorkerProcessPerCore[]; |