#include "chrome/browser/optimization_guide/browser_test_util.h"
#include "base/run_loop.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/test/metrics/histogram_tester.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "components/metrics/content/subprocess_metrics_provider.h"
#include "components/signin/public/identity_manager/account_capabilities_test_mutator.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "components/signin/public/identity_manager/identity_test_utils.h"
#include "content/public/test/browser_test_utils.h"
namespace optimization_guide {
namespace {
int GetTotalHistogramSamples(const base::HistogramTester* histogram_tester,
const std::string& histogram_name) { … }
}
int RetryForHistogramUntilCountReached(
const base::HistogramTester* histogram_tester,
const std::string& histogram_name,
int count) { … }
std::unique_ptr<optimization_guide::proto::GetModelsResponse>
BuildGetModelsResponse() { … }
void EnableSigninAndModelExecutionCapability(Profile* profile) { … }
ModelFileObserver::ModelFileObserver() = default;
ModelFileObserver::~ModelFileObserver() = default;
void ModelFileObserver::OnModelUpdated(
proto::OptimizationTarget optimization_target,
base::optional_ref<const ModelInfo> model_info) { … }
}