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

Unified Diff: net/ssl/ssl_client_session_cache.h

Issue 2625883002: SSLClientSessionCache: Log number of times Lookup is called per Session. (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/ssl/ssl_client_session_cache.cc » ('j') | net/ssl/ssl_client_session_cache.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ssl/ssl_client_session_cache.h
diff --git a/net/ssl/ssl_client_session_cache.h b/net/ssl/ssl_client_session_cache.h
index 4a82010badda3722a6d318ff74951016a155bfc2..20b2d899f9fa5b355dfacf6ee21e388e1eb4d01c 100644
--- a/net/ssl/ssl_client_session_cache.h
+++ b/net/ssl/ssl_client_session_cache.h
@@ -64,6 +64,14 @@ class NET_EXPORT SSLClientSessionCache : public base::MemoryCoordinatorClient {
void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd);
private:
+ struct Entry {
+ size_t lookup_count;
davidben 2017/01/11 16:47:50 If you just write size_t lookup_count = 0 here, I
nharper 2017/01/11 22:31:18 The chromium-style clang plugin complains that thi
+ bssl::UniquePtr<SSL_SESSION> session;
+
+ Entry();
+ ~Entry();
+ };
+
// base::MemoryCoordinatorClient implementation:
void OnMemoryStateChange(base::MemoryState state) override;
@@ -79,7 +87,7 @@ class NET_EXPORT SSLClientSessionCache : public base::MemoryCoordinatorClient {
std::unique_ptr<base::Clock> clock_;
Config config_;
- base::HashingMRUCache<std::string, bssl::UniquePtr<SSL_SESSION>> cache_;
+ base::HashingMRUCache<std::string, std::unique_ptr<Entry>> cache_;
davidben 2017/01/11 16:47:50 Does it work to do base::HashingMRUCache<std::s
nharper 2017/01/11 22:31:18 I'd prefer to it to be base::HashingMRUCache<std::
size_t lookups_since_flush_;
// TODO(davidben): After https://crbug.com/458365 is fixed, replace this with
« no previous file with comments | « no previous file | net/ssl/ssl_client_session_cache.cc » ('j') | net/ssl/ssl_client_session_cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698