chromium/components/variations/variations_seed_simulator.cc

// 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.

#include "components/variations/variations_seed_simulator.h"

#include <stddef.h>

#include <map>

#include "base/metrics/field_trial.h"
#include "base/metrics/field_trial_list_including_low_anonymity.h"
#include "base/metrics/field_trial_params.h"
#include "base/types/optional_ref.h"
#include "components/variations/client_filterable_state.h"
#include "components/variations/processed_study.h"
#include "components/variations/proto/study.pb.h"
#include "components/variations/study_filtering.h"
#include "components/variations/variations_layers.h"
#include "components/variations/variations_seed_processor.h"

namespace variations {

namespace {

enum ChangeType {};

// Simulate group assignment for the specified study with PERMANENT consistency.
// Returns the experiment group that will be selected. Mirrors logic in
// VariationsSeedProcessor::CreateTrialFromStudy().
std::string SimulateGroupAssignment(
    const base::FieldTrial::EntropyProvider& entropy_provider,
    const ProcessedStudy& processed_study) {}

// Finds an experiment in |study| with name |experiment_name| and returns it,
// or NULL if it does not exist.
const Study_Experiment* FindExperiment(const Study& study,
                                       const std::string& experiment_name) {}

// Checks whether experiment params set for |experiment| on |study| are exactly
// equal to the params registered for the corresponding field trial in the
// current process.
bool VariationParamsAreEqual(const Study& study,
                             const Study_Experiment& experiment) {}

ChangeType ConvertExperimentTypeToChangeType(Study_Experiment_Type type) {}

ChangeType PermanentStudyGroupChanged(
    const ProcessedStudy& processed_study,
    const std::string& selected_group,
    const VariationsLayers& layers,
    const base::FieldTrial::EntropyProvider& entropy_provider) {}

ChangeType SessionStudyGroupChanged(const ProcessedStudy& processed_study,
                                    const std::string& selected_group) {}

}  // namespace

SeedSimulationResult ComputeDifferences(
    const std::vector<ProcessedStudy>& processed_studies,
    const VariationsLayers& layers,
    const EntropyProviders& entropy_providers) {}

SeedSimulationResult SimulateSeedStudies(
    const VariationsSeed& seed,
    const ClientFilterableState& client_state,
    const EntropyProviders& entropy_providers) {}

}  // namespace variations