| 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 "net/url_request/url_request_context.h" | 5 #include "net/url_request/url_request_context.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/debug/alias.h" | 8 #include "base/debug/alias.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 transport_security_state_(nullptr), | 35 transport_security_state_(nullptr), |
| 36 cert_transparency_verifier_(nullptr), | 36 cert_transparency_verifier_(nullptr), |
| 37 ct_policy_enforcer_(nullptr), | 37 ct_policy_enforcer_(nullptr), |
| 38 http_transaction_factory_(nullptr), | 38 http_transaction_factory_(nullptr), |
| 39 job_factory_(nullptr), | 39 job_factory_(nullptr), |
| 40 throttler_manager_(nullptr), | 40 throttler_manager_(nullptr), |
| 41 backoff_manager_(nullptr), | 41 backoff_manager_(nullptr), |
| 42 sdch_manager_(nullptr), | 42 sdch_manager_(nullptr), |
| 43 network_quality_estimator_(nullptr), | 43 network_quality_estimator_(nullptr), |
| 44 url_requests_(new std::set<const URLRequest*>), | 44 url_requests_(new std::set<const URLRequest*>), |
| 45 enable_brotli_(false) { | 45 enable_brotli_(false), |
| 46 check_cleartext_permitted_(false) { |
| 46 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 47 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 47 this, "URLRequestContext", base::ThreadTaskRunnerHandle::Get()); | 48 this, "URLRequestContext", base::ThreadTaskRunnerHandle::Get()); |
| 48 } | 49 } |
| 49 | 50 |
| 50 URLRequestContext::~URLRequestContext() { | 51 URLRequestContext::~URLRequestContext() { |
| 51 AssertNoURLRequests(); | 52 AssertNoURLRequests(); |
| 52 base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider( | 53 base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider( |
| 53 this); | 54 this); |
| 54 } | 55 } |
| 55 | 56 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 69 set_cert_transparency_verifier(other->cert_transparency_verifier_); | 70 set_cert_transparency_verifier(other->cert_transparency_verifier_); |
| 70 set_ct_policy_enforcer(other->ct_policy_enforcer_); | 71 set_ct_policy_enforcer(other->ct_policy_enforcer_); |
| 71 set_http_transaction_factory(other->http_transaction_factory_); | 72 set_http_transaction_factory(other->http_transaction_factory_); |
| 72 set_job_factory(other->job_factory_); | 73 set_job_factory(other->job_factory_); |
| 73 set_throttler_manager(other->throttler_manager_); | 74 set_throttler_manager(other->throttler_manager_); |
| 74 set_backoff_manager(other->backoff_manager_); | 75 set_backoff_manager(other->backoff_manager_); |
| 75 set_sdch_manager(other->sdch_manager_); | 76 set_sdch_manager(other->sdch_manager_); |
| 76 set_http_user_agent_settings(other->http_user_agent_settings_); | 77 set_http_user_agent_settings(other->http_user_agent_settings_); |
| 77 set_network_quality_estimator(other->network_quality_estimator_); | 78 set_network_quality_estimator(other->network_quality_estimator_); |
| 78 set_enable_brotli(other->enable_brotli_); | 79 set_enable_brotli(other->enable_brotli_); |
| 80 set_check_cleartext_permitted(other->check_cleartext_permitted_); |
| 79 } | 81 } |
| 80 | 82 |
| 81 const HttpNetworkSession::Params* URLRequestContext::GetNetworkSessionParams( | 83 const HttpNetworkSession::Params* URLRequestContext::GetNetworkSessionParams( |
| 82 ) const { | 84 ) const { |
| 83 HttpTransactionFactory* transaction_factory = http_transaction_factory(); | 85 HttpTransactionFactory* transaction_factory = http_transaction_factory(); |
| 84 if (!transaction_factory) | 86 if (!transaction_factory) |
| 85 return nullptr; | 87 return nullptr; |
| 86 HttpNetworkSession* network_session = transaction_factory->GetSession(); | 88 HttpNetworkSession* network_session = transaction_factory->GetSession(); |
| 87 if (!network_session) | 89 if (!network_session) |
| 88 return nullptr; | 90 return nullptr; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 if (transaction_factory) { | 134 if (transaction_factory) { |
| 133 HttpNetworkSession* network_session = transaction_factory->GetSession(); | 135 HttpNetworkSession* network_session = transaction_factory->GetSession(); |
| 134 if (network_session) | 136 if (network_session) |
| 135 network_session->DumpMemoryStats(pmd, dump->absolute_name()); | 137 network_session->DumpMemoryStats(pmd, dump->absolute_name()); |
| 136 } | 138 } |
| 137 SSLClientSocketImpl::DumpSSLClientSessionMemoryStats(pmd); | 139 SSLClientSocketImpl::DumpSSLClientSessionMemoryStats(pmd); |
| 138 return true; | 140 return true; |
| 139 } | 141 } |
| 140 | 142 |
| 141 } // namespace net | 143 } // namespace net |
| OLD | NEW |