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

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

Issue 1814543002: Fix callsites to URLRequestContext::CopyFrom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add browser tests Created 4 years, 8 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 8ac61f10b528de01cfe9e4fbac37474cdf8412af..99d7f9c1abc24e87f4f4836b14f6f28f11163c97 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -332,11 +332,23 @@ net::URLRequestContext* OffTheRecordProfileIOData::InitializeAppRequestContext(
// extensions API, but we need to update it to understand isolated apps first.
context->SetCookieStore(
content::CreateCookieStore(content::CookieStoreConfig()));
+ scoped_ptr<net::ChannelIDService> channel_id_service(
+ new net::ChannelIDService(new net::DefaultChannelIDStore(nullptr),
+ base::WorkerPool::GetTaskRunner(true)));
+
+ // Build a new HttpNetworkSession that uses the new ChannelIDService.
+ net::HttpNetworkSession::Params network_params =
+ http_network_session_->params();
+ network_params.channel_id_service = channel_id_service.get();
+ scoped_ptr<net::HttpNetworkSession> http_network_session(
+ new net::HttpNetworkSession(network_params));
// Use a separate in-memory cache for the app.
std::unique_ptr<net::HttpCache> app_http_cache = CreateHttpFactory(
- http_network_session_.get(), net::HttpCache::DefaultBackend::InMemory(0));
+ http_network_session.get(), net::HttpCache::DefaultBackend::InMemory(0));
+ context->SetChannelIDService(std::move(channel_id_service));
+ context->SetHttpNetworkSession(std::move(http_network_session));
context->SetHttpTransactionFactory(std::move(app_http_cache));
std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory(
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_browsertest.cc » ('j') | chrome/browser/profiles/profile_browsertest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698