#include "content/public/browser/synthetic_trial_syncer.h"
#include "base/functional/bind.h"
#include "components/variations/synthetic_trial_registry.h"
#include "content/common/synthetic_trial_configuration.mojom.h"
#include "content/public/browser/browser_child_process_host_iterator.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_data.h"
#include "content/public/browser/child_process_host.h"
#include "content/public/browser/render_process_host.h"
namespace content {
namespace {
std::vector<mojom::SyntheticTrialGroupPtr> ConvertTrialGroupsToMojo(
const std::vector<variations::SyntheticTrialGroup>& trials) { … }
void NotifyChildProcess(
mojo::Remote<mojom::SyntheticTrialConfiguration>&
synthetic_trial_configuration,
const std::vector<variations::SyntheticTrialGroup>& trials_updated,
const std::vector<variations::SyntheticTrialGroup>& trials_removed) { … }
ChildProcessHost* FindChildProcessHost(int unique_id) { … }
}
std::unique_ptr<SyntheticTrialSyncer> SyntheticTrialSyncer::Create(
variations::SyntheticTrialRegistry* registry) { … }
void SyntheticTrialSyncer::OnDisconnected(int unique_child_process_id) { … }
SyntheticTrialSyncer::SyntheticTrialSyncer(
variations::SyntheticTrialRegistry* registry)
: … { … }
SyntheticTrialSyncer::~SyntheticTrialSyncer() { … }
void SyntheticTrialSyncer::OnSyntheticTrialsChanged(
const std::vector<variations::SyntheticTrialGroup>& trials_updated,
const std::vector<variations::SyntheticTrialGroup>& trials_removed,
const std::vector<variations::SyntheticTrialGroup>& groups) { … }
void SyntheticTrialSyncer::BrowserChildProcessLaunchedAndConnected(
const ChildProcessData& data) { … }
void SyntheticTrialSyncer::BrowserChildProcessHostDisconnected(
const ChildProcessData& data) { … }
void SyntheticTrialSyncer::OnRenderProcessHostCreated(RenderProcessHost* host) { … }
void SyntheticTrialSyncer::RenderProcessReady(RenderProcessHost* host) { … }
void SyntheticTrialSyncer::RenderProcessExited(
RenderProcessHost* host,
const ChildProcessTerminationInfo& info) { … }
void SyntheticTrialSyncer::RenderProcessHostDestroyed(RenderProcessHost* host) { … }
}