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

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

Issue 11293252: Change Interceptors into URLRequestJobFactory::ProtocolHandlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: some cleanup Created 8 years, 1 month 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 65ee20fd951857fde1efbcddaf5ba6ecf41af0c8..d1cc50e62fad3822aada2606377a54bc1de10db3 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -217,13 +217,12 @@ void OffTheRecordProfileIOData::LazyInitializeInternal(
scoped_ptr<net::URLRequestJobFactoryImpl> main_job_factory(
new net::URLRequestJobFactoryImpl());
- SetUpJobFactoryDefaults(
- main_job_factory.get(),
+ main_job_factory_ = SetUpJobFactoryDefaults(
+ main_job_factory.Pass(),
profile_params->protocol_handler_interceptor.Pass(),
network_delegate(),
main_context->ftp_transaction_factory(),
main_context->ftp_auth_cache());
- main_job_factory_ = main_job_factory.Pass();
main_context->set_job_factory(main_job_factory_.get());
#if defined(ENABLE_EXTENSIONS)
@@ -270,13 +269,12 @@ void OffTheRecordProfileIOData::
// job_factory::IsHandledProtocol return true, which prevents attempts to
// handle the protocol externally. We pass NULL in to
// SetUpJobFactoryDefaults() to get this effect.
- SetUpJobFactoryDefaults(
- extensions_job_factory.get(),
+ extensions_job_factory_ = SetUpJobFactoryDefaults(
+ extensions_job_factory.Pass(),
scoped_ptr<net::URLRequestJobFactoryImpl::Interceptor>(NULL),
NULL,
extensions_context->ftp_transaction_factory(),
extensions_context->ftp_auth_cache());
- extensions_job_factory_ = extensions_job_factory.Pass();
extensions_context->set_job_factory(extensions_job_factory_.get());
}
@@ -306,14 +304,15 @@ OffTheRecordProfileIOData::InitializeAppRequestContext(
context->SetHttpTransactionFactory(app_http_cache.Pass());
- scoped_ptr<net::URLRequestJobFactoryImpl> job_factory(
+ scoped_ptr<net::URLRequestJobFactoryImpl> base_job_factory(
new net::URLRequestJobFactoryImpl());
- SetUpJobFactoryDefaults(job_factory.get(),
- protocol_handler_interceptor.Pass(),
- network_delegate(),
- context->ftp_transaction_factory(),
- context->ftp_auth_cache());
- context->SetJobFactory(job_factory.PassAs<net::URLRequestJobFactory>());
+ scoped_ptr<net::URLRequestJobFactory> top_job_factory =
+ SetUpJobFactoryDefaults(base_job_factory.Pass(),
+ protocol_handler_interceptor.Pass(),
+ network_delegate(),
+ context->ftp_transaction_factory(),
+ context->ftp_auth_cache());
+ context->SetJobFactory(top_job_factory.Pass());
return context;
}

Powered by Google App Engine
This is Rietveld 408576698