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

Unified Diff: components/cronet/host_cache_persistence_manager.h

Issue 2958023002: Add histograms and NetLog for host cache persistence (Closed)
Patch Set: use scoped timer Created 3 years, 6 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
Index: components/cronet/host_cache_persistence_manager.h
diff --git a/components/cronet/host_cache_persistence_manager.h b/components/cronet/host_cache_persistence_manager.h
index 156f96639dc7679d1c0943076440b34105774983..2b160cfd2a5bc21b33d11e98854227c003d3106d 100644
--- a/components/cronet/host_cache_persistence_manager.h
+++ b/components/cronet/host_cache_persistence_manager.h
@@ -15,9 +15,14 @@
#include "base/timer/timer.h"
#include "components/prefs/pref_change_registrar.h"
#include "net/dns/host_cache.h"
+#include "net/log/net_log_with_source.h"
class PrefService;
+namespace net {
+class NetLog;
+}
+
namespace cronet {
// Handles the interaction between HostCache and prefs for persistence.
// When notified of a change in the HostCache, starts a timer, or ignores if the
@@ -40,7 +45,8 @@ class HostCachePersistenceManager : public net::HostCache::PersistenceDelegate {
HostCachePersistenceManager(net::HostCache* cache,
PrefService* pref_service,
std::string pref_name,
- base::TimeDelta delay);
+ base::TimeDelta delay,
+ net::NetLog* net_log);
virtual ~HostCachePersistenceManager();
// net::HostCache::PersistenceDelegate implementation
@@ -62,6 +68,8 @@ class HostCachePersistenceManager : public net::HostCache::PersistenceDelegate {
const base::TimeDelta delay_;
base::OneShotTimer timer_;
+ const net::NetLogWithSource net_log_;
+
SEQUENCE_CHECKER(sequence_checker_);
base::WeakPtrFactory<HostCachePersistenceManager> weak_factory_;
« no previous file with comments | « components/cronet/android/cronet_url_request_context_adapter.cc ('k') | components/cronet/host_cache_persistence_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698