Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1428)

Unified Diff: chrome/browser/net/chrome_url_request_context.cc

Issue 42197: Add command line switch "--new-ftp" for new portable... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Upload before checkin Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_url_request_context.cc
===================================================================
--- chrome/browser/net/chrome_url_request_context.cc (revision 11734)
+++ chrome/browser/net/chrome_url_request_context.cc (working copy)
@@ -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 @@
}
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 @@
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
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698