1 // Copyright 2019 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef COMPONENTS_METRICS_UKM_DEMOGRAPHIC_METRICS_PROVIDER_H_ 6 #define COMPONENTS_METRICS_UKM_DEMOGRAPHIC_METRICS_PROVIDER_H_ 7 8 namespace ukm { 9 class Report; 10 } 11 12 namespace metrics { 13 14 // TODO(crbug.com/40103560): The UkmDemographicMetricsProvider interface is only 15 // needed to break the dependency cycle `views -> ukm -> demographic metrics 16 // provider -> sync -> policy -> bookmarks -> views` by removing the dependency 17 // on the demographic metrics provider target to build the ukm service. This 18 // interface should be removed once the dependency cycle is solved at the root. 19 20 // Interface of the provider of the synced user’s noised birth year and gender 21 // to the UKM metrics server. For more details, see the documentation of 22 // DemographicMetricsProvider at 23 // components/metrics/demographics/demographic_metrics_provider.h. 24 class UkmDemographicMetricsProvider { 25 public: 26 virtual ~UkmDemographicMetricsProvider() = default; 27 28 // Provides the synced user's noised birth year and gender to the UKM metrics 29 // report. 30 virtual void ProvideSyncedUserNoisedBirthYearAndGenderToReport( 31 ukm::Report* report) = 0; 32 }; 33 34 } // namespace metrics 35 36 #endif // COMPONENTS_METRICS_UKM_DEMOGRAPHIC_METRICS_PROVIDER_H_