summaryrefslogtreecommitdiff
path: root/chromium/components/ukm/ukm_service.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/components/ukm/ukm_service.h
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/components/ukm/ukm_service.h')
-rw-r--r--chromium/components/ukm/ukm_service.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/chromium/components/ukm/ukm_service.h b/chromium/components/ukm/ukm_service.h
index 2ebeb130734..37d6ab19591 100644
--- a/chromium/components/ukm/ukm_service.h
+++ b/chromium/components/ukm/ukm_service.h
@@ -18,6 +18,7 @@
#include "components/metrics/delegating_provider.h"
#include "components/metrics/metrics_provider.h"
#include "components/metrics/metrics_rotation_scheduler.h"
+#include "components/metrics/ukm_demographic_metrics_provider.h"
#include "components/ukm/ukm_entry_filter.h"
#include "components/ukm/ukm_recorder_impl.h"
#include "components/ukm/ukm_reporting_service.h"
@@ -31,7 +32,6 @@ FORWARD_DECLARE_TEST(IOSChromeMetricsServiceClientTest,
namespace metrics {
class MetricsServiceClient;
class UkmBrowserTestBase;
-class UkmDemographicMetricsProvider;
}
namespace ukm {
@@ -59,10 +59,10 @@ class UkmService : public UkmRecorderImpl {
// Constructs a UkmService.
// Calling code is responsible for ensuring that the lifetime of
// |pref_service| is longer than the lifetime of UkmService. The parameters
- // |pref_service|, |client|, and |demographics_provider| must not be null.
+ // |pref_service|, |client| must not be null. |demographics_provider| may be
+ // null.
UkmService(PrefService* pref_service,
metrics::MetricsServiceClient* client,
- bool restrict_to_whitelist_entries,
std::unique_ptr<metrics::UkmDemographicMetricsProvider>
demographics_provider);
~UkmService() override;
@@ -108,11 +108,18 @@ class UkmService : public UkmRecorderImpl {
int32_t report_count() const { return report_count_; }
+ void set_restrict_to_whitelist_entries_for_testing(bool value) {
+ restrict_to_whitelist_entries_ = value;
+ }
+
// Enables adding the synced user's noised birth year and gender to the UKM
// report. For more details, see doc of metrics::DemographicMetricsProvider in
// components/metrics/demographic_metrics_provider.h.
static const base::Feature kReportUserNoisedUserBirthYearAndGender;
+ // Makes sure that the serialized ukm report can be parsed.
+ static bool LogCanBeParsed(const std::string& serialized_data);
+
private:
friend ::metrics::UkmBrowserTestBase;
friend ::ukm::UkmTestHelper;