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

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

Issue 2428143002: Clean up FtpTransactionFacory ownership. (Closed)
Patch Set: Oops Created 4 years, 2 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 6fd18bc1f8be691839ed5ab5e0887e8144b63e58..e9a1f7490e09033b02c04090a7bc7f30eb835cdc 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -31,7 +31,6 @@
#include "content/public/browser/resource_context.h"
#include "extensions/common/constants.h"
#include "net/base/sdch_manager.h"
-#include "net/ftp/ftp_network_layer.h"
#include "net/http/http_cache.h"
#include "net/http/http_network_session.h"
#include "net/http/http_server_properties_impl.h"
@@ -246,11 +245,6 @@ void OffTheRecordProfileIOData::InitializeInternal(
CreateMainHttpFactory(main_context_storage->http_network_session(),
net::HttpCache::DefaultBackend::InMemory(0)));
-#if !defined(DISABLE_FTP_SUPPORT)
- ftp_factory_.reset(
- new net::FtpNetworkLayer(main_context->host_resolver()));
-#endif // !defined(DISABLE_FTP_SUPPORT)
-
std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory(
new net::URLRequestJobFactoryImpl());
@@ -258,7 +252,7 @@ void OffTheRecordProfileIOData::InitializeInternal(
main_context_storage->set_job_factory(SetUpJobFactoryDefaults(
std::move(main_job_factory), std::move(request_interceptors),
std::move(profile_params->protocol_handler_interceptor),
- main_context->network_delegate(), ftp_factory_.get()));
+ main_context->network_delegate(), main_context->host_resolver()));
// Setup SDCH for this profile.
main_context_storage->set_sdch_manager(base::MakeUnique<net::SdchManager>());
@@ -306,7 +300,7 @@ void OffTheRecordProfileIOData::
std::move(extensions_job_factory),
content::URLRequestInterceptorScopedVector(),
std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>(), NULL,
- ftp_factory_.get());
+ io_thread_globals->host_resolver.get());
extensions_context->set_job_factory(extensions_job_factory_.get());
}
@@ -355,7 +349,7 @@ net::URLRequestContext* OffTheRecordProfileIOData::InitializeAppRequestContext(
top_job_factory = SetUpJobFactoryDefaults(
std::move(job_factory), std::move(request_interceptors),
std::move(protocol_handler_interceptor), main_context->network_delegate(),
- ftp_factory_.get());
+ main_context->host_resolver());
context->SetJobFactory(std::move(top_job_factory));
return context;
}

Powered by Google App Engine
This is Rietveld 408576698