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

Side by Side Diff: chrome/browser/profiles/off_the_record_profile_io_data.cc

Issue 2907463002: Split HttpNetworkSession::Params into two structs. (Closed)
Patch Set: Response to comments Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/profiles/profile_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/off_the_record_profile_io_data.h" 5 #include "chrome/browser/profiles/off_the_record_profile_io_data.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 // TODO(creis): We should have a cookie delegate for notifying the cookie 282 // TODO(creis): We should have a cookie delegate for notifying the cookie
283 // extensions API, but we need to update it to understand isolated apps first. 283 // extensions API, but we need to update it to understand isolated apps first.
284 std::unique_ptr<net::CookieStore> cookie_store = 284 std::unique_ptr<net::CookieStore> cookie_store =
285 content::CreateCookieStore(content::CookieStoreConfig()); 285 content::CreateCookieStore(content::CookieStoreConfig());
286 std::unique_ptr<net::ChannelIDService> channel_id_service( 286 std::unique_ptr<net::ChannelIDService> channel_id_service(
287 new net::ChannelIDService(new net::DefaultChannelIDStore(nullptr))); 287 new net::ChannelIDService(new net::DefaultChannelIDStore(nullptr)));
288 cookie_store->SetChannelIDServiceID(channel_id_service->GetUniqueID()); 288 cookie_store->SetChannelIDServiceID(channel_id_service->GetUniqueID());
289 context->SetCookieStore(std::move(cookie_store)); 289 context->SetCookieStore(std::move(cookie_store));
290 290
291 // Build a new HttpNetworkSession that uses the new ChannelIDService. 291 // Build a new HttpNetworkSession that uses the new ChannelIDService.
292 net::HttpNetworkSession::Params network_params = 292 net::HttpNetworkSession::Context session_context =
293 main_request_context_storage()->http_network_session()->params(); 293 main_request_context_storage()->http_network_session()->context();
294 network_params.channel_id_service = channel_id_service.get(); 294 session_context.channel_id_service = channel_id_service.get();
295 std::unique_ptr<net::HttpNetworkSession> http_network_session( 295 std::unique_ptr<net::HttpNetworkSession> http_network_session(
296 new net::HttpNetworkSession(network_params)); 296 new net::HttpNetworkSession(
297 main_request_context_storage()->http_network_session()->params(),
298 session_context));
297 299
298 // Use a separate in-memory cache for the app. 300 // Use a separate in-memory cache for the app.
299 std::unique_ptr<net::HttpCache> app_http_cache = CreateMainHttpFactory( 301 std::unique_ptr<net::HttpCache> app_http_cache = CreateMainHttpFactory(
300 http_network_session.get(), net::HttpCache::DefaultBackend::InMemory(0)); 302 http_network_session.get(), net::HttpCache::DefaultBackend::InMemory(0));
301 303
302 context->SetChannelIDService(std::move(channel_id_service)); 304 context->SetChannelIDService(std::move(channel_id_service));
303 context->SetHttpNetworkSession(std::move(http_network_session)); 305 context->SetHttpNetworkSession(std::move(http_network_session));
304 context->SetHttpTransactionFactory(std::move(app_http_cache)); 306 context->SetHttpTransactionFactory(std::move(app_http_cache));
305 307
306 std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory( 308 std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory(
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 return app_request_context; 349 return app_request_context;
348 } 350 }
349 351
350 net::URLRequestContext* 352 net::URLRequestContext*
351 OffTheRecordProfileIOData::AcquireIsolatedMediaRequestContext( 353 OffTheRecordProfileIOData::AcquireIsolatedMediaRequestContext(
352 net::URLRequestContext* app_context, 354 net::URLRequestContext* app_context,
353 const StoragePartitionDescriptor& partition_descriptor) const { 355 const StoragePartitionDescriptor& partition_descriptor) const {
354 NOTREACHED(); 356 NOTREACHED();
355 return NULL; 357 return NULL;
356 } 358 }
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/profiles/profile_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698