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

Unified Diff: chrome/browser/profiles/off_the_record_profile_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: Removed whitespace 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/off_the_record_profile_io_data.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc
index c33f78c2c4b2fbdacaa4c59c3bbeffe6e40468c9..2868867f9b46eed18f3be6a71bec9ea8f39fbf54 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -27,6 +27,8 @@
#include "net/ftp/ftp_network_layer.h"
#include "net/http/http_cache.h"
#include "net/http/http_server_properties_impl.h"
+#include "net/url_request/ftp_protocol_handler.h"
+#include "net/url_request/url_request_job_factory.h"
#include "webkit/database/database_tracker.h"
using content::BrowserThread;
@@ -243,11 +245,26 @@ void OffTheRecordProfileIOData::LazyInitializeInternal(
new net::FtpNetworkLayer(main_context->host_resolver()));
main_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());
- main_context->set_job_factory(job_factory());
- extensions_context->set_job_factory(job_factory());
+ main_job_factory_.reset(new net::URLRequestJobFactory);
+ extentions_job_factory_.reset(new net::URLRequestJobFactory);
+
+ SetUpJobFactoryDefaults(main_job_factory_.get());
+ SetUpJobFactoryDefaults(extentions_job_factory_.get());
+
+ main_job_factory_->SetProtocolHandler(chrome::kFtpScheme,
+ new net::FtpProtocolHandler(
+ network_delegate(), ftp_factory_.get(), ftp_auth_cache_.get()));
mmenke 2012/06/26 18:36:10 nit: Fix indent. I'd suggest: main_job_factory_
shalev 2012/06/26 19:05:01 Done.
+ extentions_job_factory_->SetProtocolHandler(chrome::kFtpScheme,
+ new net::FtpProtocolHandler(
+ network_delegate(), ftp_factory_.get(), ftp_auth_cache_.get()));
mmenke 2012/06/26 18:36:10 nit: Fix indent.
shalev 2012/06/26 19:05:01 Done.
+
+ main_context->set_job_factory(main_job_factory_.get());
+ extensions_context->set_job_factory(extentions_job_factory_.get());
}
ChromeURLRequestContext*

Powered by Google App Engine
This is Rietveld 408576698