chromium/chrome/browser/ui/webui/metrics_internals/field_trials_handler.cc

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/ui/webui/metrics_internals/field_trials_handler.h"

#include <string_view>

#include "base/functional/bind.h"
#include "base/strings/string_split.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "components/variations/field_trial_internals_utils.h"
#include "components/variations/hashing.h"
#include "components/variations/service/variations_service.h"
#include "google_apis/gaia/gaia_auth_util.h"

namespace {
HashNameAsHexString;
TrialGroup;

// Returns a `Group` from components/metrics/debug/browser_proxy.ts.
base::Value::Dict ToGroupValue(
    bool show_names,
    const base::flat_map<std::string, std::string>& overrides,
    std::string_view study_name,
    std::string_view group_name) {}

// Returns a `Trial` from components/metrics/debug/browser_proxy.ts.
base::Value::Dict ToTrialValue(
    bool show_names,
    const base::flat_map<std::string, std::string>& overrides,
    const variations::StudyGroupNames& study) {}

TrialGroup FindExperimentFromHashes(
    const std::vector<variations::StudyGroupNames>& studies,
    std::string_view study_hash,
    std::string_view experiment_hash) {}

// Returns all possible intrepretations of `name` as a Trial and Group name.
// All of "Trial/Group", "Trial.Group", "Trial:Group", "Trial-Group" are
// allowed.
std::vector<TrialGroup> ParseGroup(std::string_view name) {}

}  // namespace

FieldTrialsHandler::FieldTrialsHandler(Profile* profile) :{}
FieldTrialsHandler::~FieldTrialsHandler() = default;

void FieldTrialsHandler::RegisterMessages() {}

void FieldTrialsHandler::InitializeFieldTrials() {}

base::Value::Dict FieldTrialsHandler::GetFieldTrialStateValue() {}

void FieldTrialsHandler::HandleFetchState(const base::Value::List& args) {}

void FieldTrialsHandler::HandleSetEnrollState(const base::Value::List& args) {}

bool FieldTrialsHandler::SetOverride(const ExperimentOverride& override,
                                     bool enabled) {}

void FieldTrialsHandler::HandleRestart(const base::Value::List& args) {}

void FieldTrialsHandler::HandleLookupTrialOrGroupName(
    const base::Value::List& args) {}