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

Unified Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 10537056: Replaced static URLRequestFtpJob factory with non-static protocol handler for FTP jobs. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added DCHECKs Created 8 years, 6 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
Index: chrome/browser/profiles/profile_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index 454f0b04212b1373120191fc5af6cdc2fbb4abf4..4c1126f1da750b4e356e1f291d25f3fcf7e72e2a 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -30,6 +30,7 @@
#include "net/base/server_bound_cert_service.h"
#include "net/ftp/ftp_network_layer.h"
#include "net/http/http_cache.h"
+#include "net/url_request/ftp_protocol_handler.h"
#include "net/url_request/url_request_job_factory.h"
#include "webkit/quota/special_storage_policy.h"
@@ -443,6 +444,8 @@ void ProfileImplIOData::LazyInitializeInternal(
main_context->set_ftp_transaction_factory(ftp_factory_.get());
media_request_context_->set_ftp_transaction_factory(ftp_factory_.get());
+ ftp_auth_cache_.reset(new net::FtpAuthCache);
+
main_context->set_chrome_url_data_manager_backend(
chrome_url_data_manager_backend());
@@ -450,6 +453,10 @@ void ProfileImplIOData::LazyInitializeInternal(
media_request_context_->set_job_factory(job_factory());
extensions_context->set_job_factory(job_factory());
+ job_factory()->SetProtocolHandler(chrome::kFtpScheme,
+ new net::FtpProtocolHandler(
+ network_delegate(), ftp_factory_.get(), ftp_auth_cache_.get()));
+
job_factory()->AddInterceptor(
new chrome_browser_net::ConnectInterceptor(predictor_.get()));

Powered by Google App Engine
This is Rietveld 408576698