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

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: 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
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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 cache.DumpMemoryStats(process_memory_dump.get()); 366 cache.DumpMemoryStats(process_memory_dump.get());
367 367
368 const base::trace_event::MemoryAllocatorDump* dump = 368 const base::trace_event::MemoryAllocatorDump* dump =
369 process_memory_dump->GetAllocatorDump("net/ssl_session_cache"); 369 process_memory_dump->GetAllocatorDump("net/ssl_session_cache");
370 ASSERT_NE(nullptr, dump); 370 ASSERT_NE(nullptr, dump);
371 std::unique_ptr<base::Value> raw_attrs = 371 std::unique_ptr<base::Value> raw_attrs =
372 dump->attributes_for_testing()->ToBaseValue(); 372 dump->attributes_for_testing()->ToBaseValue();
373 base::DictionaryValue* attrs; 373 base::DictionaryValue* attrs;
374 ASSERT_TRUE(raw_attrs->GetAsDictionary(&attrs)); 374 ASSERT_TRUE(raw_attrs->GetAsDictionary(&attrs));
375 ASSERT_TRUE(attrs->HasKey("cert_count")); 375 ASSERT_TRUE(attrs->HasKey("cert_count"));
376 ASSERT_TRUE(attrs->HasKey("serialized_cert_size")); 376 ASSERT_TRUE(attrs->HasKey("cert_size"));
377 ASSERT_TRUE(attrs->HasKey(base::trace_event::MemoryAllocatorDump::kNameSize)); 377 ASSERT_TRUE(attrs->HasKey(base::trace_event::MemoryAllocatorDump::kNameSize));
378 } 378 }
379 379
380 } // namespace net 380 } // namespace net
OLDNEW
« net/ssl/ssl_client_session_cache.cc ('K') | « 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