From c30a6232df03e1efbd9f3b226777b07e087a1122 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 12 Oct 2020 14:27:29 +0200 Subject: BASELINE: Update Chromium to 85.0.4183.140 Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen --- chromium/components/metrics/metrics_log.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'chromium/components/metrics/metrics_log.h') diff --git a/chromium/components/metrics/metrics_log.h b/chromium/components/metrics/metrics_log.h index b4e7cd40bb3..6a265aa0618 100644 --- a/chromium/components/metrics/metrics_log.h +++ b/chromium/components/metrics/metrics_log.h @@ -15,6 +15,7 @@ #include #include "base/macros.h" +#include "base/metrics/histogram_base.h" #include "base/time/time.h" #include "components/metrics/metrics_service_client.h" #include "third_party/metrics_proto/chrome_user_metrics_extension.pb.h" @@ -165,6 +166,10 @@ class MetricsLog { LogType log_type() const { return log_type_; } + // Returns the number of samples in this log, it is only valid after the + // histogram delta is calculated. + base::HistogramBase::Count samples_count() const { return samples_count_; } + // Exposed for the sake of mocking/accessing in test code. ChromeUserMetricsExtension* UmaProtoForTest() { return &uma_proto_; } @@ -212,6 +217,9 @@ class MetricsLog { // RecordEnvironment() or LoadSavedEnvironmentFromPrefs(). bool has_environment_; + // The number of samples in this log. + base::HistogramBase::Count samples_count_ = 0; + DISALLOW_COPY_AND_ASSIGN(MetricsLog); }; -- cgit v1.2.1