#include "components/metrics/metrics_service.h"
#include <memory>
#include <string>
#include <vector>
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/memory/weak_ptr.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
#include "chrome/browser/metrics/chrome_metrics_services_manager_client.h"
#include "chrome/browser/metrics/testing/sync_metrics_test_utils.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/sync/test/integration/sync_service_impl_harness.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "components/metrics/delegating_provider.h"
#include "components/metrics/demographics/demographic_metrics_provider.h"
#include "components/metrics/demographics/demographic_metrics_test_utils.h"
#include "components/metrics/metrics_switches.h"
#include "components/metrics_services_manager/metrics_services_manager.h"
#include "components/sync/service/sync_user_settings.h"
#include "content/public/test/browser_test.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/metrics_proto/chrome_user_metrics_extension.pb.h"
#include "third_party/metrics_proto/user_demographics.pb.h"
namespace metrics {
namespace {
class MetricsServiceUserDemographicsBrowserTest
: public SyncTest,
public testing::WithParamInterface<test::DemographicsTestParams> { … };
IN_PROC_BROWSER_TEST_P(MetricsServiceUserDemographicsBrowserTest,
AddSyncedUserBirthYearAndGenderToProtoData) { … }
#if BUILDFLAG(IS_CHROMEOS_ASH)
static const auto kDemographicsTestParams = testing::Values(
test::DemographicsTestParams{false,
false});
#else
static const auto kDemographicsTestParams = …;
#endif
INSTANTIATE_TEST_SUITE_P(…);
}
}