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

Unified Diff: chrome/browser/page_load_metrics/page_load_metrics_util.h

Issue 2681193003: Page load metrics observers cleanup (Closed)
Patch Set: address comment 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/page_load_metrics/page_load_metrics_util.h
diff --git a/chrome/browser/page_load_metrics/page_load_metrics_util.h b/chrome/browser/page_load_metrics/page_load_metrics_util.h
index a8abf7efd0fc40b0b434ba70e52185510c11deac..3babd6ad10150b5999fe958cbf31ad896d2bfeb2 100644
--- a/chrome/browser/page_load_metrics/page_load_metrics_util.h
+++ b/chrome/browser/page_load_metrics/page_load_metrics_util.h
@@ -14,6 +14,13 @@
base::TimeDelta::FromMilliseconds(10), \
base::TimeDelta::FromMinutes(10), 100)
+// Records |bytes| to |histogram_name| in kilobytes (i.e., bytes / 1024).
+#define PAGE_BYTES_HISTOGRAM(histogram_name, bytes) \
+ UMA_HISTOGRAM_CUSTOM_COUNTS( \
+ histogram_name, static_cast<int>((bytes) / 1024), 1, 500 * 1024, 50)
+
+#define PAGE_RESOURCE_COUNT_HISTOGRAM UMA_HISTOGRAM_COUNTS_10000
+
namespace page_load_metrics {
struct PageLoadExtraInfo;

Powered by Google App Engine
This is Rietveld 408576698