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

Unified Diff: components/precache/core/precache_database.cc

Issue 2628513002: Add Precache.CacheStatus.Prefetch UMA. (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
Index: components/precache/core/precache_database.cc
diff --git a/components/precache/core/precache_database.cc b/components/precache/core/precache_database.cc
index 94e62082ec161d52dd46c1065311b66df317c611..c10c183db6650ad55ca0af05a3f11029ba6c343e 100644
--- a/components/precache/core/precache_database.cc
+++ b/components/precache/core/precache_database.cc
@@ -4,6 +4,8 @@
#include "components/precache/core/precache_database.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/location.h"
@@ -151,6 +153,9 @@ void PrecacheDatabase::RecordURLPrefetchMetrics(
DCHECK(thread_checker_.CalledOnValidThread());
UMA_HISTOGRAM_TIMES("Precache.Latency.Prefetch", latency);
+ UMA_HISTOGRAM_ENUMERATION("Precache.CacheStatus.Prefetch",
+ info.cache_entry_status,
+ net::HttpResponseInfo::CacheEntryStatus::ENTRY_MAX);
DCHECK(info.headers) << "The headers are required to get the freshness.";
if (info.headers) {
« no previous file with comments | « components/precache/content/precache_manager_unittest.cc ('k') | components/precache/core/precache_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698