| 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_THREAD(thread_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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 HttpCache* http_cache = transaction_factory->GetCache(); | 191 HttpCache* http_cache = transaction_factory->GetCache(); |
| 191 if (http_cache) | 192 if (http_cache) |
| 192 http_cache->DumpMemoryStats(pmd, dump->absolute_name()); | 193 http_cache->DumpMemoryStats(pmd, dump->absolute_name()); |
| 193 } | 194 } |
| 194 if (sdch_manager_) | 195 if (sdch_manager_) |
| 195 sdch_manager_->DumpMemoryStats(pmd, dump_name); | 196 sdch_manager_->DumpMemoryStats(pmd, dump_name); |
| 196 return true; | 197 return true; |
| 197 } | 198 } |
| 198 | 199 |
| 199 } // namespace net | 200 } // namespace net |
| OLD | NEW |