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

Unified Diff: chrome/browser/profiles/off_the_record_profile_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/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 6cadb70c6d84945e0ff4211ef3a5cbd1d7be8bd1..15c5ffa3597755417b3bd9a50e28da8d237bc5b1 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -239,11 +239,15 @@ void OffTheRecordProfileIOData::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());
+ net::URLRequestJobFactoryImpl* main_job_factory =
erikwright (departed) 2012/10/15 15:35:34 I think that assigning to a local scoped_ptr<URLRe
+ 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);
SetUpJobFactoryDefaults(
- main_job_factory_.get(),
+ main_job_factory,
profile_params->protocol_handler_interceptor.Pass(),
network_delegate(),
main_context->ftp_transaction_factory(),
@@ -255,7 +259,7 @@ void OffTheRecordProfileIOData::LazyInitializeInternal(
// handle the protocol externally. We pass NULL in to
// SetUpJobFactoryDefaults() to get this effect.
SetUpJobFactoryDefaults(
- extensions_job_factory_.get(),
+ extensions_job_factory,
scoped_ptr<net::URLRequestJobFactoryImpl::Interceptor>(NULL),
NULL,
extensions_context->ftp_transaction_factory(),
@@ -291,9 +295,10 @@ OffTheRecordProfileIOData::InitializeAppRequestContext(
context->SetHttpTransactionFactory(app_http_cache.Pass());
- scoped_ptr<net::URLRequestJobFactory> job_factory(
- new net::URLRequestJobFactoryImpl());
- SetUpJobFactoryDefaults(job_factory.get(),
+ net::URLRequestJobFactoryImpl* factory_impl =
+ new net::URLRequestJobFactoryImpl();
+ scoped_ptr<net::URLRequestJobFactory> job_factory(factory_impl);
erikwright (departed) 2012/10/15 15:35:34 You should be able to just change the template par
+ SetUpJobFactoryDefaults(factory_impl,
protocol_handler_interceptor.Pass(),
network_delegate(),
context->ftp_transaction_factory(),
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_impl_io_data.h » ('j') | chrome/browser/profiles/profile_impl_io_data.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698