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

Side by Side Diff: net/ssl/ssl_client_session_cache_unittest.cc

Issue 2696403007: Add a multiplier in tracking certificate memory allocation size (Closed)
Patch Set: self 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/ssl/ssl_client_session_cache.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ssl/ssl_client_session_cache.h" 5 #include "net/ssl/ssl_client_session_cache.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/test/simple_test_clock.h" 10 #include "base/test/simple_test_clock.h"
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 cache.DumpMemoryStats(process_memory_dump.get()); 379 cache.DumpMemoryStats(process_memory_dump.get());
380 380
381 const base::trace_event::MemoryAllocatorDump* dump = 381 const base::trace_event::MemoryAllocatorDump* dump =
382 process_memory_dump->GetAllocatorDump("net/ssl_session_cache"); 382 process_memory_dump->GetAllocatorDump("net/ssl_session_cache");
383 ASSERT_NE(nullptr, dump); 383 ASSERT_NE(nullptr, dump);
384 std::unique_ptr<base::Value> raw_attrs = 384 std::unique_ptr<base::Value> raw_attrs =
385 dump->attributes_for_testing()->ToBaseValue(); 385 dump->attributes_for_testing()->ToBaseValue();
386 base::DictionaryValue* attrs; 386 base::DictionaryValue* attrs;
387 ASSERT_TRUE(raw_attrs->GetAsDictionary(&attrs)); 387 ASSERT_TRUE(raw_attrs->GetAsDictionary(&attrs));
388 ASSERT_TRUE(attrs->HasKey("cert_count")); 388 ASSERT_TRUE(attrs->HasKey("cert_count"));
389 ASSERT_TRUE(attrs->HasKey("serialized_cert_size")); 389 ASSERT_TRUE(attrs->HasKey("cert_size"));
390 ASSERT_TRUE(attrs->HasKey("undeduped_cert_size"));
391 ASSERT_TRUE(attrs->HasKey("undeduped_cert_count"));
390 ASSERT_TRUE(attrs->HasKey(base::trace_event::MemoryAllocatorDump::kNameSize)); 392 ASSERT_TRUE(attrs->HasKey(base::trace_event::MemoryAllocatorDump::kNameSize));
391 } 393 }
392 394
393 } // namespace net 395 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/ssl_client_session_cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698