| OLD | NEW |
| 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/io_thread.h" | 5 #include "chrome/browser/io_thread.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 << "Unable to decode CT public key."; | 696 << "Unable to decode CT public key."; |
| 697 scoped_refptr<net::CTLogVerifier> external_log_verifier( | 697 scoped_refptr<net::CTLogVerifier> external_log_verifier( |
| 698 net::CTLogVerifier::Create(ct_public_key_data, log_description, | 698 net::CTLogVerifier::Create(ct_public_key_data, log_description, |
| 699 log_url)); | 699 log_url)); |
| 700 CHECK(external_log_verifier) << "Unable to parse CT public key."; | 700 CHECK(external_log_verifier) << "Unable to parse CT public key."; |
| 701 VLOG(1) << "Adding log with description " << log_description; | 701 VLOG(1) << "Adding log with description " << log_description; |
| 702 ct_logs.push_back(external_log_verifier); | 702 ct_logs.push_back(external_log_verifier); |
| 703 } | 703 } |
| 704 } | 704 } |
| 705 | 705 |
| 706 globals_->ct_logs.assign(ct_logs.begin(), ct_logs.end()); |
| 707 |
| 706 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 | 708 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 |
| 707 // is fixed. | 709 // is fixed. |
| 708 tracked_objects::ScopedTracker tracking_profile9( | 710 tracked_objects::ScopedTracker tracking_profile9( |
| 709 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 711 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 710 "466432 IOThread::InitAsync::CreateLogVerifiers::End")); | 712 "466432 IOThread::InitAsync::CreateLogVerifiers::End")); |
| 711 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 | 713 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 |
| 712 // is fixed. | 714 // is fixed. |
| 713 tracked_objects::ScopedTracker tracking_profile7( | 715 tracked_objects::ScopedTracker tracking_profile7( |
| 714 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 716 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 715 "466432 IOThread::InitAsync::CreateMultiLogVerifier")); | 717 "466432 IOThread::InitAsync::CreateMultiLogVerifier")); |
| 716 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier(); | 718 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier(); |
| 717 globals_->cert_transparency_verifier.reset(ct_verifier); | 719 globals_->cert_transparency_verifier.reset(ct_verifier); |
| 718 // Add built-in logs | 720 // Add built-in logs |
| 719 ct_verifier->AddLogs(ct_logs); | 721 ct_verifier->AddLogs(globals_->ct_logs); |
| 720 | 722 |
| 721 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 | 723 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 |
| 722 // is fixed. | 724 // is fixed. |
| 723 tracked_objects::ScopedTracker tracking_profile10( | 725 tracked_objects::ScopedTracker tracking_profile10( |
| 724 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 726 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 725 "466432 IOThread::InitAsync::CertPolicyEnforcer")); | 727 "466432 IOThread::InitAsync::CertPolicyEnforcer")); |
| 726 net::CertPolicyEnforcer* policy_enforcer = new net::CertPolicyEnforcer; | 728 net::CertPolicyEnforcer* policy_enforcer = new net::CertPolicyEnforcer; |
| 727 globals_->cert_policy_enforcer.reset(policy_enforcer); | 729 globals_->cert_policy_enforcer.reset(policy_enforcer); |
| 728 | 730 |
| 729 globals_->ssl_config_service = GetSSLConfigService(); | 731 globals_->ssl_config_service = GetSSLConfigService(); |
| (...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1654 globals->proxy_script_fetcher_url_request_job_factory = job_factory.Pass(); | 1656 globals->proxy_script_fetcher_url_request_job_factory = job_factory.Pass(); |
| 1655 | 1657 |
| 1656 context->set_job_factory( | 1658 context->set_job_factory( |
| 1657 globals->proxy_script_fetcher_url_request_job_factory.get()); | 1659 globals->proxy_script_fetcher_url_request_job_factory.get()); |
| 1658 | 1660 |
| 1659 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the | 1661 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
| 1660 // system URLRequestContext too. There's no reason this should be tied to a | 1662 // system URLRequestContext too. There's no reason this should be tied to a |
| 1661 // profile. | 1663 // profile. |
| 1662 return context; | 1664 return context; |
| 1663 } | 1665 } |
| OLD | NEW |