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

Unified Diff: components/cronet/android/cronet_url_request_context_adapter.cc

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
« no previous file with comments | « no previous file | components/cronet/host_cache_persistence_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/cronet_url_request_context_adapter.cc
diff --git a/components/cronet/android/cronet_url_request_context_adapter.cc b/components/cronet/android/cronet_url_request_context_adapter.cc
index 510ab011c1cc79bf6de577982c37c7c59351a7db..4b94f3144da842841ae8504ff4a28c6de864844b 100644
--- a/components/cronet/android/cronet_url_request_context_adapter.cc
+++ b/components/cronet/android/cronet_url_request_context_adapter.cc
@@ -663,7 +663,11 @@ void CronetURLRequestContextAdapter::InitializeOnNetworkThread(
if (config->enable_host_cache_persistence) {
registry->RegisterListPref(kHostCachePref);
}
- pref_service_ = factory.Create(registry.get());
+
+ {
+ SCOPED_UMA_HISTOGRAM_TIMER("Net.Cronet.PrefsInitTime");
+ pref_service_ = factory.Create(registry.get());
+ }
// Set up the HttpServerPropertiesManager.
std::unique_ptr<net::HttpServerPropertiesManager>
@@ -727,7 +731,8 @@ void CronetURLRequestContextAdapter::InitializeOnNetworkThread(
base::MakeUnique<HostCachePersistenceManager>(
host_cache, pref_service_.get(), kHostCachePref,
base::TimeDelta::FromMilliseconds(
- config->host_cache_persistence_delay_ms));
+ config->host_cache_persistence_delay_ms),
+ g_net_log.Get().net_log());
}
context_->set_check_cleartext_permitted(true);
« no previous file with comments | « no previous file | components/cronet/host_cache_persistence_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698