// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_VARIATIONS_VARIATIONS_IDS_PROVIDER_H_ #define COMPONENTS_VARIATIONS_VARIATIONS_IDS_PROVIDER_H_ #include <map> #include <set> #include <string> #include <utility> #include <vector> #include "base/component_export.h" #include "base/gtest_prod_util.h" #include "base/memory/raw_ptr.h" #include "base/metrics/field_trial.h" #include "base/synchronization/lock.h" #include "components/variations/proto/study.pb.h" #include "components/variations/synthetic_trials.h" #include "components/variations/variations.mojom.h" #include "components/variations/variations_associated_data.h" namespace variations { class VariationsClient; namespace cros_early_boot::evaluate_seed { // For friend purposes (for DestroyInstanceForTesting().) class VariationsCrosEvaluateSeedMainTest; } // namespace cros_early_boot::evaluate_seed // The key for a VariationsIdsProvider's |variations_headers_map_|. A // VariationsHeaderKey provides more details about the VariationsIDs included in // a particular header. For example, the header associated with a key with true // for |is_signed_in| and Study_GoogleWebVisibility_ANY for |web_visibility| has // (i) VariationsIDs associated with external experiments, which can be sent // only for signed-in users and (ii) VariationsIDs that can be sent in first- // and third-party contexts. struct COMPONENT_EXPORT(VARIATIONS) VariationsHeaderKey { … }; // A helper class for maintaining client experiments and metrics state // transmitted in custom HTTP request headers. // This class is a thread-safe singleton. class COMPONENT_EXPORT(VARIATIONS) VariationsIdsProvider : public base::FieldTrialList::Observer, public SyntheticTrialObserver { … }; } // namespace variations #endif // COMPONENTS_VARIATIONS_VARIATIONS_IDS_PROVIDER_H_