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

Side by Side Diff: ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.mm

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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.h" 5 #include "ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 net::URLRequestContext* main_context) const { 298 net::URLRequestContext* main_context) const {
299 // Copy most state from the main context. 299 // Copy most state from the main context.
300 AppRequestContext* context = new AppRequestContext(); 300 AppRequestContext* context = new AppRequestContext();
301 context->CopyFrom(main_context); 301 context->CopyFrom(main_context);
302 302
303 // Use a separate ChannelIDService. 303 // Use a separate ChannelIDService.
304 std::unique_ptr<net::ChannelIDService> channel_id_service( 304 std::unique_ptr<net::ChannelIDService> channel_id_service(
305 new net::ChannelIDService(new net::DefaultChannelIDStore(nullptr))); 305 new net::ChannelIDService(new net::DefaultChannelIDStore(nullptr)));
306 306
307 // Build a new HttpNetworkSession that uses the new ChannelIDService. 307 // Build a new HttpNetworkSession that uses the new ChannelIDService.
308 net::HttpNetworkSession::Params network_params = 308 net::HttpNetworkSession::Context session_context =
309 http_network_session_->params(); 309 http_network_session_->context();
310 network_params.channel_id_service = channel_id_service.get(); 310 session_context.channel_id_service = channel_id_service.get();
311 std::unique_ptr<net::HttpNetworkSession> http_network_session( 311 std::unique_ptr<net::HttpNetworkSession> http_network_session(
312 new net::HttpNetworkSession(network_params)); 312 new net::HttpNetworkSession(http_network_session_->params(),
313 session_context));
313 314
314 // Use a separate HTTP disk cache for isolated apps. 315 // Use a separate HTTP disk cache for isolated apps.
315 std::unique_ptr<net::HttpCache::BackendFactory> app_backend = 316 std::unique_ptr<net::HttpCache::BackendFactory> app_backend =
316 net::HttpCache::DefaultBackend::InMemory(0); 317 net::HttpCache::DefaultBackend::InMemory(0);
317 std::unique_ptr<net::HttpCache> app_http_cache = 318 std::unique_ptr<net::HttpCache> app_http_cache =
318 CreateHttpFactory(http_network_session.get(), std::move(app_backend)); 319 CreateHttpFactory(http_network_session.get(), std::move(app_backend));
319 320
320 cookie_util::CookieStoreConfig ios_cookie_config( 321 cookie_util::CookieStoreConfig ios_cookie_config(
321 base::FilePath(), 322 base::FilePath(),
322 cookie_util::CookieStoreConfig::EPHEMERAL_SESSION_COOKIES, 323 cookie_util::CookieStoreConfig::EPHEMERAL_SESSION_COOKIES,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 const base::Closure& completion) { 357 const base::Closure& completion) {
357 DCHECK_CURRENTLY_ON(web::WebThread::IO); 358 DCHECK_CURRENTLY_ON(web::WebThread::IO);
358 DCHECK(initialized()); 359 DCHECK(initialized());
359 360
360 DCHECK(transport_security_state()); 361 DCHECK(transport_security_state());
361 // Completes synchronously. 362 // Completes synchronously.
362 transport_security_state()->DeleteAllDynamicDataSince(time); 363 transport_security_state()->DeleteAllDynamicDataSince(time);
363 DCHECK(http_server_properties_manager_); 364 DCHECK(http_server_properties_manager_);
364 http_server_properties_manager_->Clear(completion); 365 http_server_properties_manager_->Clear(completion);
365 } 366 }
OLDNEW
« no previous file with comments | « google_apis/gcm/tools/mcs_probe.cc ('k') | ios/chrome/browser/browser_state/chrome_browser_state_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698