#ifndef CONTENT_CHILD_CHILD_PROCESS_SYNTHETIC_TRIAL_SYNCER_H_
#define CONTENT_CHILD_CHILD_PROCESS_SYNTHETIC_TRIAL_SYNCER_H_
#include <string>
#include <vector>
#include "components/variations/synthetic_trials.h"
#include "content/common/content_export.h"
#include "content/common/synthetic_trial_configuration.mojom.h"
namespace content {
class CONTENT_EXPORT ChildProcessSyntheticTrialSyncer
: public mojom::SyntheticTrialConfiguration {
public:
static void Create(
mojo::PendingReceiver<mojom::SyntheticTrialConfiguration> receiver);
ChildProcessSyntheticTrialSyncer();
~ChildProcessSyntheticTrialSyncer() override;
ChildProcessSyntheticTrialSyncer(const ChildProcessSyntheticTrialSyncer&) =
delete;
ChildProcessSyntheticTrialSyncer& operator=(
const ChildProcessSyntheticTrialSyncer&) = delete;
ChildProcessSyntheticTrialSyncer(ChildProcessSyntheticTrialSyncer&&) = delete;
private:
friend class ChildProcessSyntheticTrialSyncerTest;
static std::unique_ptr<ChildProcessSyntheticTrialSyncer>
CreateInstanceForTesting();
void AddOrUpdateSyntheticTrialGroups(
std::vector<mojom::SyntheticTrialGroupPtr> trial_groups) override;
void RemoveSyntheticTrialGroups(
std::vector<mojom::SyntheticTrialGroupPtr> trial_groups) override;
void AddOrUpdateTrialGroupInternal(const std::string& trial_name,
const std::string& group_name);
std::vector<variations::SyntheticTrialGroup> trials_;
};
}
#endif