diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-16 20:13:33 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-16 20:13:33 +0000 |
commit | b65ce0948709317aadc38e18c1a16f23a72bb5eb (patch) | |
tree | f4f9f816e60a18afb214dbd0d1a5ea8108ad3863 /chrome | |
parent | 0f9d542be7a415150b3002e3a0c642f9f2e252a4 (diff) | |
download | chromium_src-b65ce0948709317aadc38e18c1a16f23a72bb5eb.zip chromium_src-b65ce0948709317aadc38e18c1a16f23a72bb5eb.tar.gz chromium_src-b65ce0948709317aadc38e18c1a16f23a72bb5eb.tar.bz2 |
Add command line switch "--new-ftp" for new portable FTP
implementation.
Add the (empty) URLRequestNewFtpJob class.
Contributed by Ibrar Ahmed <ibrar.ahmad@gmail.com>.
BUG=4965
R=darin,wtc
Review URL: http://codereview.chromium.org/42197
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11768 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/net/chrome_url_request_context.cc | 11 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 3 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 2 |
3 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc index a33716e..528c0e1 100644 --- a/chrome/browser/net/chrome_url_request_context.cc +++ b/chrome/browser/net/chrome_url_request_context.cc @@ -15,6 +15,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" +#include "net/ftp/ftp_network_layer.h" #include "net/http/http_cache.h" #include "net/http/http_network_layer.h" #include "net/http/http_util.h" @@ -82,6 +83,15 @@ ChromeURLRequestContext* ChromeURLRequestContext::CreateOriginal( } context->http_transaction_factory_ = cache; + // The kNewFtp switch is Windows specific only because we have multiple FTP + // implementations on Windows. +#if defined(OS_WIN) + if (command_line.HasSwitch(switches::kNewFtp)) + context->ftp_transaction_factory_ = new net::FtpNetworkLayer; +#else + context->ftp_transaction_factory_ = new net::FtpNetworkLayer; +#endif + // setup cookie store if (!context->cookie_store_) { DCHECK(!cookie_store_path.empty()); @@ -288,6 +298,7 @@ ChromeURLRequestContext::~ChromeURLRequestContext() { NotificationService::NoDetails()); delete cookie_store_; + delete ftp_transaction_factory_; delete http_transaction_factory_; // Do not delete the proxy service in the case of OTR, as it is owned by the diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 1a7e91b..0a101b4 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -392,6 +392,9 @@ const wchar_t kTestName[] = L"test-name"; // command line. (Useful values might be "valgrind" or "gdb --args") const wchar_t kRendererCmdPrefix[] = L"renderer-cmd-prefix"; +// Temparary option for new ftp implemetation. +const wchar_t kNewFtp[] = L"new-ftp"; + // On POSIX only: use FIFO for IPC channels so that "unrelated" process // can connect to a channel, provided it knows its name. For debugging purposes. const wchar_t kIPCUseFIFO[] = L"ipc-use-fifo"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 07b171f..cd78d00 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -149,6 +149,8 @@ extern const wchar_t kTestName[]; extern const wchar_t kRendererCmdPrefix[]; +extern const wchar_t kNewFtp[]; + extern const wchar_t kIPCUseFIFO[]; extern const wchar_t kEnableOutOfProcessDevTools[]; |