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

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

Issue 11154006: Change initialization interface of URLRequestJobFactory objects. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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/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 faba3535fa634f92fc430102620364147e664686..f9af103291822a7f6242ae1dce078e51619a1eaf 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -443,10 +443,14 @@ void ProfileImplIOData::LazyInitializeInternal(
main_context->set_chrome_url_data_manager_backend(
chrome_url_data_manager_backend());
- main_job_factory_.reset(new net::URLRequestJobFactoryImpl);
- extensions_job_factory_.reset(new net::URLRequestJobFactoryImpl);
-
- SetUpJobFactory(main_job_factory_.get(),
+ net::URLRequestJobFactoryImpl* main_job_factory =
erikwright (departed) 2012/10/15 15:35:34 same comments as previous file.
+ new net::URLRequestJobFactoryImpl();
+ main_job_factory_.reset(main_job_factory);
+ net::URLRequestJobFactoryImpl* extensions_job_factory =
+ new net::URLRequestJobFactoryImpl();
+ extensions_job_factory_.reset(extensions_job_factory);
+
+ SetUpJobFactory(main_job_factory,
profile_params->protocol_handler_interceptor.Pass(),
network_delegate(),
main_context->ftp_transaction_factory(),
@@ -457,7 +461,7 @@ void ProfileImplIOData::LazyInitializeInternal(
// job_factory::IsHandledProtocol return true, which prevents attempts to
// handle the protocol externally. We pass NULL in to
// SetUpJobFactory() to get this effect.
- SetUpJobFactory(extensions_job_factory_.get(),
+ SetUpJobFactory(extensions_job_factory,
scoped_ptr<net::URLRequestJobFactoryImpl::Interceptor>(NULL),
NULL,
extensions_context->ftp_transaction_factory(),
@@ -550,9 +554,10 @@ ProfileImplIOData::InitializeAppRequestContext(
// Overwrite the job factory that we inherit from the main context so
// that we can later provide our own handles for storage related protocols.
- scoped_ptr<net::URLRequestJobFactory> job_factory(
- new net::URLRequestJobFactoryImpl());
- SetUpJobFactory(job_factory.get(), protocol_handler_interceptor.Pass(),
+ net::URLRequestJobFactoryImpl* factory_impl =
erikwright (departed) 2012/10/15 15:35:34 same comments as previous file.
+ new net::URLRequestJobFactoryImpl();
+ scoped_ptr<net::URLRequestJobFactory> job_factory(factory_impl);
+ SetUpJobFactory(factory_impl, protocol_handler_interceptor.Pass(),
network_delegate(),
context->ftp_transaction_factory(),
context->ftp_auth_cache());
@@ -648,7 +653,7 @@ chrome_browser_net::LoadTimeStats* ProfileImplIOData::GetLoadTimeStats(
}
void ProfileImplIOData::SetUpJobFactory(
- net::URLRequestJobFactory* job_factory,
+ net::URLRequestJobFactoryImpl* job_factory,
scoped_ptr<net::URLRequestJobFactory::Interceptor>
protocol_handler_interceptor,
net::NetworkDelegate* network_delegate,

Powered by Google App Engine
This is Rietveld 408576698