| 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 <inttypes.h> | 7 #include <inttypes.h> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/debug/alias.h" | 10 #include "base/debug/alias.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 reporting_service_(nullptr), | 51 reporting_service_(nullptr), |
| 52 enable_brotli_(false), | 52 enable_brotli_(false), |
| 53 check_cleartext_permitted_(false), | 53 check_cleartext_permitted_(false), |
| 54 name_(nullptr), | 54 name_(nullptr), |
| 55 largest_outstanding_requests_count_seen_(0) { | 55 largest_outstanding_requests_count_seen_(0) { |
| 56 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 56 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 57 this, "URLRequestContext", base::ThreadTaskRunnerHandle::Get()); | 57 this, "URLRequestContext", base::ThreadTaskRunnerHandle::Get()); |
| 58 } | 58 } |
| 59 | 59 |
| 60 URLRequestContext::~URLRequestContext() { | 60 URLRequestContext::~URLRequestContext() { |
| 61 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); |
| 61 AssertNoURLRequests(); | 62 AssertNoURLRequests(); |
| 62 base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider( | 63 base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider( |
| 63 this); | 64 this); |
| 64 } | 65 } |
| 65 | 66 |
| 66 void URLRequestContext::CopyFrom(const URLRequestContext* other) { | 67 void URLRequestContext::CopyFrom(const URLRequestContext* other) { |
| 67 // Copy URLRequestContext parameters. | 68 // Copy URLRequestContext parameters. |
| 68 set_net_log(other->net_log_); | 69 set_net_log(other->net_log_); |
| 69 set_host_resolver(other->host_resolver_); | 70 set_host_resolver(other->host_resolver_); |
| 70 set_cert_verifier(other->cert_verifier_); | 71 set_cert_verifier(other->cert_verifier_); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 HttpCache* http_cache = transaction_factory->GetCache(); | 177 HttpCache* http_cache = transaction_factory->GetCache(); |
| 177 if (http_cache) | 178 if (http_cache) |
| 178 http_cache->DumpMemoryStats(pmd, dump->absolute_name()); | 179 http_cache->DumpMemoryStats(pmd, dump->absolute_name()); |
| 179 } | 180 } |
| 180 if (sdch_manager_) | 181 if (sdch_manager_) |
| 181 sdch_manager_->DumpMemoryStats(pmd, dump_name); | 182 sdch_manager_->DumpMemoryStats(pmd, dump_name); |
| 182 return true; | 183 return true; |
| 183 } | 184 } |
| 184 | 185 |
| 185 } // namespace net | 186 } // namespace net |
| OLD | NEW |