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

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

Issue 182993003: Add the ability for DevTools to wrap network transactions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_io_data.h ('k') | chrome/browser/profiles/profile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 68a127fda6c941c24faa8aec78e9212254823ea2..e16770b2c3c9ff8a948639dea9518bdfe91ad79f 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -142,6 +142,12 @@ OffTheRecordProfileIOData::Handle::CreateIsolatedAppRequestContextGetter(
return context;
}
+DevToolsNetworkController*
+OffTheRecordProfileIOData::Handle::GetDevToolsNetworkController() const {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ return io_data_->network_controller();
+}
+
void OffTheRecordProfileIOData::Handle::LazyInitialize() const {
if (initialized_)
return;
@@ -218,13 +224,9 @@ void OffTheRecordProfileIOData::InitializeInternal(
net::HttpCache::BackendFactory* main_backend =
net::HttpCache::DefaultBackend::InMemory(0);
- net::HttpNetworkSession::Params network_session_params;
- PopulateNetworkSessionParams(profile_params, &network_session_params);
- net::HttpCache* cache = new net::HttpCache(
- network_session_params, main_backend);
+ main_http_factory_ = CreateMainHttpFactory(profile_params, main_backend);
- main_http_factory_.reset(cache);
- main_context->set_http_transaction_factory(cache);
+ main_context->set_http_transaction_factory(main_http_factory_.get());
#if !defined(DISABLE_FTP_SUPPORT)
ftp_factory_.reset(
new net::FtpNetworkLayer(main_context->host_resolver()));
@@ -314,10 +316,11 @@ ChromeURLRequestContext* OffTheRecordProfileIOData::InitializeAppRequestContext(
net::HttpCache::DefaultBackend::InMemory(0);
net::HttpNetworkSession* main_network_session =
main_http_factory_->GetSession();
- scoped_ptr<net::HttpTransactionFactory> app_http_cache(
- new net::HttpCache(main_network_session, app_backend));
+ scoped_ptr<net::HttpCache> app_http_cache =
+ CreateHttpFactory(main_network_session, app_backend);
- context->SetHttpTransactionFactory(app_http_cache.Pass());
+ context->SetHttpTransactionFactory(
+ app_http_cache.PassAs<net::HttpTransactionFactory>());
scoped_ptr<net::URLRequestJobFactoryImpl> job_factory(
new net::URLRequestJobFactoryImpl());
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_io_data.h ('k') | chrome/browser/profiles/profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698