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/http/http_network_session.h" | 5 #include "net/http/http_network_session.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 std::string name = base::StringPrintf("net/http_network_session_%p", this); | 422 std::string name = base::StringPrintf("net/http_network_session_%p", this); |
423 base::trace_event::MemoryAllocatorDump* http_network_session_dump = | 423 base::trace_event::MemoryAllocatorDump* http_network_session_dump = |
424 pmd->GetAllocatorDump(name); | 424 pmd->GetAllocatorDump(name); |
425 if (http_network_session_dump == nullptr) { | 425 if (http_network_session_dump == nullptr) { |
426 http_network_session_dump = pmd->CreateAllocatorDump(name); | 426 http_network_session_dump = pmd->CreateAllocatorDump(name); |
427 normal_socket_pool_manager_->DumpMemoryStats( | 427 normal_socket_pool_manager_->DumpMemoryStats( |
428 pmd, http_network_session_dump->absolute_name()); | 428 pmd, http_network_session_dump->absolute_name()); |
429 spdy_session_pool_.DumpMemoryStats( | 429 spdy_session_pool_.DumpMemoryStats( |
430 pmd, http_network_session_dump->absolute_name()); | 430 pmd, http_network_session_dump->absolute_name()); |
431 } | 431 } |
| 432 |
432 // Create an empty row under parent's dump so size can be attributed correctly | 433 // Create an empty row under parent's dump so size can be attributed correctly |
433 // if |this| is shared between URLRequestContexts. | 434 // if |this| is shared between URLRequestContexts. It is not required if |
434 base::trace_event::MemoryAllocatorDump* empty_row_dump = | 435 // parent details are not reported. |
435 pmd->CreateAllocatorDump(base::StringPrintf( | 436 if (!parent_absolute_name.empty()) { |
436 "%s/http_network_session", parent_absolute_name.c_str())); | 437 base::trace_event::MemoryAllocatorDump* empty_row_dump = |
437 pmd->AddOwnershipEdge(empty_row_dump->guid(), | 438 pmd->CreateAllocatorDump(base::StringPrintf( |
438 http_network_session_dump->guid()); | 439 "%s/http_network_session", parent_absolute_name.c_str())); |
| 440 pmd->AddOwnershipEdge(empty_row_dump->guid(), |
| 441 http_network_session_dump->guid()); |
| 442 } |
439 } | 443 } |
440 | 444 |
441 bool HttpNetworkSession::IsQuicEnabled() const { | 445 bool HttpNetworkSession::IsQuicEnabled() const { |
442 return params_.enable_quic; | 446 return params_.enable_quic; |
443 } | 447 } |
444 | 448 |
445 void HttpNetworkSession::DisableQuic() { | 449 void HttpNetworkSession::DisableQuic() { |
446 params_.enable_quic = false; | 450 params_.enable_quic = false; |
447 } | 451 } |
448 | 452 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 break; | 488 break; |
485 case base::MemoryState::SUSPENDED: | 489 case base::MemoryState::SUSPENDED: |
486 // Note: Not supported at present. Fall through. | 490 // Note: Not supported at present. Fall through. |
487 case base::MemoryState::UNKNOWN: | 491 case base::MemoryState::UNKNOWN: |
488 NOTREACHED(); | 492 NOTREACHED(); |
489 break; | 493 break; |
490 } | 494 } |
491 } | 495 } |
492 | 496 |
493 } // namespace net | 497 } // namespace net |
OLD | NEW |