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

Side by Side Diff: ios/chrome/browser/browser_state/chrome_browser_state_io_data.cc

Issue 2026213002: Refactor CertificateReportSender (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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_io_data.h" 5 #include "ios/chrome/browser/browser_state/chrome_browser_state_io_data.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "net/cookies/canonical_cookie.h" 50 #include "net/cookies/canonical_cookie.h"
51 #include "net/http/http_network_session.h" 51 #include "net/http/http_network_session.h"
52 #include "net/http/http_transaction_factory.h" 52 #include "net/http/http_transaction_factory.h"
53 #include "net/http/http_util.h" 53 #include "net/http/http_util.h"
54 #include "net/http/transport_security_persister.h" 54 #include "net/http/transport_security_persister.h"
55 #include "net/nqe/network_quality_estimator.h" 55 #include "net/nqe/network_quality_estimator.h"
56 #include "net/proxy/proxy_config_service_fixed.h" 56 #include "net/proxy/proxy_config_service_fixed.h"
57 #include "net/proxy/proxy_script_fetcher_impl.h" 57 #include "net/proxy/proxy_script_fetcher_impl.h"
58 #include "net/proxy/proxy_service.h" 58 #include "net/proxy/proxy_service.h"
59 #include "net/ssl/channel_id_service.h" 59 #include "net/ssl/channel_id_service.h"
60 #include "net/url_request/certificate_report_sender.h"
61 #include "net/url_request/data_protocol_handler.h" 60 #include "net/url_request/data_protocol_handler.h"
62 #include "net/url_request/file_protocol_handler.h" 61 #include "net/url_request/file_protocol_handler.h"
62 #include "net/url_request/report_sender.h"
63 #include "net/url_request/url_request.h" 63 #include "net/url_request/url_request.h"
64 #include "net/url_request/url_request_context.h" 64 #include "net/url_request/url_request_context.h"
65 #include "net/url_request/url_request_context_builder.h" 65 #include "net/url_request/url_request_context_builder.h"
66 #include "net/url_request/url_request_intercepting_job_factory.h" 66 #include "net/url_request/url_request_intercepting_job_factory.h"
67 #include "net/url_request/url_request_interceptor.h" 67 #include "net/url_request/url_request_interceptor.h"
68 #include "net/url_request/url_request_job_factory_impl.h" 68 #include "net/url_request/url_request_job_factory_impl.h"
69 69
70 namespace { 70 namespace {
71 71
72 // For safe shutdown, must be called before the ChromeBrowserStateIOData is 72 // For safe shutdown, must be called before the ChromeBrowserStateIOData is
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 std::move(profile_params_->proxy_config_service), 357 std::move(profile_params_->proxy_config_service),
358 true /* quick_check_enabled */); 358 true /* quick_check_enabled */);
359 transport_security_state_.reset(new net::TransportSecurityState()); 359 transport_security_state_.reset(new net::TransportSecurityState());
360 base::SequencedWorkerPool* pool = web::WebThread::GetBlockingPool(); 360 base::SequencedWorkerPool* pool = web::WebThread::GetBlockingPool();
361 transport_security_persister_.reset(new net::TransportSecurityPersister( 361 transport_security_persister_.reset(new net::TransportSecurityPersister(
362 transport_security_state_.get(), profile_params_->path, 362 transport_security_state_.get(), profile_params_->path,
363 pool->GetSequencedTaskRunnerWithShutdownBehavior( 363 pool->GetSequencedTaskRunnerWithShutdownBehavior(
364 pool->GetSequenceToken(), base::SequencedWorkerPool::BLOCK_SHUTDOWN), 364 pool->GetSequenceToken(), base::SequencedWorkerPool::BLOCK_SHUTDOWN),
365 IsOffTheRecord())); 365 IsOffTheRecord()));
366 366
367 certificate_report_sender_.reset(new net::CertificateReportSender( 367 certificate_report_sender_.reset(new net::ReportSender(
368 main_request_context_.get(), 368 main_request_context_.get(), net::ReportSender::DO_NOT_SEND_COOKIES));
369 net::CertificateReportSender::DO_NOT_SEND_COOKIES));
370 transport_security_state_->SetReportSender(certificate_report_sender_.get()); 369 transport_security_state_->SetReportSender(certificate_report_sender_.get());
371 370
372 // Take ownership over these parameters. 371 // Take ownership over these parameters.
373 cookie_settings_ = profile_params_->cookie_settings; 372 cookie_settings_ = profile_params_->cookie_settings;
374 host_content_settings_map_ = profile_params_->host_content_settings_map; 373 host_content_settings_map_ = profile_params_->host_content_settings_map;
375 374
376 main_request_context_->set_cert_verifier( 375 main_request_context_->set_cert_verifier(
377 io_thread_globals->cert_verifier.get()); 376 io_thread_globals->cert_verifier.get());
378 377
379 InitializeInternal(std::move(network_delegate), profile_params_.get(), 378 InitializeInternal(std::move(network_delegate), profile_params_.get(),
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 return std::unique_ptr<net::HttpCache>( 480 return std::unique_ptr<net::HttpCache>(
482 new net::HttpCache(session, std::move(main_backend), true)); 481 new net::HttpCache(session, std::move(main_backend), true));
483 } 482 }
484 483
485 std::unique_ptr<net::HttpCache> ChromeBrowserStateIOData::CreateHttpFactory( 484 std::unique_ptr<net::HttpCache> ChromeBrowserStateIOData::CreateHttpFactory(
486 net::HttpNetworkSession* shared_session, 485 net::HttpNetworkSession* shared_session,
487 std::unique_ptr<net::HttpCache::BackendFactory> backend) const { 486 std::unique_ptr<net::HttpCache::BackendFactory> backend) const {
488 return std::unique_ptr<net::HttpCache>( 487 return std::unique_ptr<net::HttpCache>(
489 new net::HttpCache(shared_session, std::move(backend), true)); 488 new net::HttpCache(shared_session, std::move(backend), true));
490 } 489 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/browser_state/chrome_browser_state_io_data.h ('k') | net/http/transport_security_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698