From f7eaed5286974984ba5f9e3189d8f49d03e99f81 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 12 May 2022 15:59:20 +0200 Subject: BASELINE: Update Chromium to 100.0.4896.167 Change-Id: I98cbeb5d7543d966ffe04d8cefded0c493a11333 Reviewed-by: Allan Sandfeld Jensen --- .../components/metrics/metrics_service_client.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'chromium/components/metrics/metrics_service_client.h') diff --git a/chromium/components/metrics/metrics_service_client.h b/chromium/components/metrics/metrics_service_client.h index 2296f20b5a7..63ef4017065 100644 --- a/chromium/components/metrics/metrics_service_client.h +++ b/chromium/components/metrics/metrics_service_client.h @@ -6,7 +6,6 @@ #define COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ #include - #include #include @@ -204,6 +203,27 @@ class MetricsServiceClient { // should no-op for other platforms. virtual void UpdateCurrentUserMetricsConsent(bool user_metrics_consent) {} + // Returns the current user metrics consent if it should be applied to decide + // the current metrics reporting state. This allows embedders to determine + // when a user metric consent state should not be applied (ie no logged in + // user or managed policy). + // + // Will return absl::nullopt if there is no current user or current user + // metrics consent should not be applied to determine metrics reporting state. + // + // Not all platforms support per-user consent. If per-user consent is not + // supported, this function should return absl::nullopt. + virtual absl::optional GetCurrentUserMetricsConsent() const; + + // Returns the current user id. + // + // Will return absl::nullopt if there is no current user, metrics reporting is + // disabled, or current user should not have a user id. + // + // Not all platforms support per-user consent. If per-user consent is not + // supported, this function should return absl::nullopt. + virtual absl::optional GetCurrentUserId() const; + private: base::RepeatingClosure update_running_services_; }; -- cgit v1.2.1