Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: net/spdy/spdy_session_pool.cc

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/spdy/spdy_header_block.cc ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/spdy/spdy_session_pool.h" 5 #include "net/spdy/spdy_session_pool.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 void SpdySessionPool::DumpMemoryStats( 375 void SpdySessionPool::DumpMemoryStats(
376 base::trace_event::ProcessMemoryDump* pmd, 376 base::trace_event::ProcessMemoryDump* pmd,
377 const std::string& parent_dump_absolute_name) const { 377 const std::string& parent_dump_absolute_name) const {
378 if (sessions_.empty()) 378 if (sessions_.empty())
379 return; 379 return;
380 size_t total_size = 0; 380 size_t total_size = 0;
381 size_t buffer_size = 0; 381 size_t buffer_size = 0;
382 size_t cert_count = 0; 382 size_t cert_count = 0;
383 size_t serialized_cert_size = 0; 383 size_t serialized_cert_size = 0;
384 size_t num_active_sessions = 0; 384 size_t num_active_sessions = 0;
385 for (const auto& session : sessions_) { 385 for (auto* session : sessions_) {
386 StreamSocket::SocketMemoryStats stats; 386 StreamSocket::SocketMemoryStats stats;
387 bool is_session_active = false; 387 bool is_session_active = false;
388 total_size += session->DumpMemoryStats(&stats, &is_session_active); 388 total_size += session->DumpMemoryStats(&stats, &is_session_active);
389 buffer_size += stats.buffer_size; 389 buffer_size += stats.buffer_size;
390 cert_count += stats.cert_count; 390 cert_count += stats.cert_count;
391 serialized_cert_size += stats.serialized_cert_size; 391 serialized_cert_size += stats.serialized_cert_size;
392 if (is_session_active) 392 if (is_session_active)
393 num_active_sessions++; 393 num_active_sessions++;
394 } 394 }
395 total_size += SpdyEstimateMemoryUsage(ObtainHpackHuffmanTable()) + 395 total_size += SpdyEstimateMemoryUsage(ObtainHpackHuffmanTable()) +
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 483
484 if (idle_only && (*it)->is_active()) 484 if (idle_only && (*it)->is_active())
485 continue; 485 continue;
486 486
487 (*it)->CloseSessionOnError(error, description); 487 (*it)->CloseSessionOnError(error, description);
488 DCHECK(!IsSessionAvailable(*it)); 488 DCHECK(!IsSessionAvailable(*it));
489 } 489 }
490 } 490 }
491 491
492 } // namespace net 492 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_header_block.cc ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698