#include "components/optimization_guide/core/hints_component_util.h"
#include <string>
#include <utility>
#include "base/files/file.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/stringprintf.h"
#include "components/optimization_guide/core/bloom_filter.h"
#include "components/optimization_guide/core/hints_component_info.h"
#include "components/optimization_guide/core/hints_processing_util.h"
#include "components/optimization_guide/core/optimization_filter.h"
#include "components/optimization_guide/core/optimization_guide_features.h"
namespace optimization_guide {
namespace {
const char kProcessHintsComponentResultHistogramString[] = …;
void PopulateProcessHintsComponentResultIfSet(
ProcessHintsComponentResult result,
ProcessHintsComponentResult* out_result) { … }
void PopulateOptimizationFilterStatusIfSet(
OptimizationFilterStatus status,
OptimizationFilterStatus* out_status) { … }
std::unique_ptr<BloomFilter> ProcessBloomFilter(
const proto::OptimizationFilter& optimization_filter,
OptimizationFilterStatus* out_status) { … }
std::unique_ptr<RegexpList> ProcessRegexps(
const google::protobuf::RepeatedPtrField<std::string>& regexps_list,
OptimizationFilterStatus* out_status) { … }
}
const char kComponentHintsUpdatedResultHistogramString[] = …;
void RecordProcessHintsComponentResult(ProcessHintsComponentResult result) { … }
std::unique_ptr<proto::Configuration> ProcessHintsComponent(
const HintsComponentInfo& component_info,
ProcessHintsComponentResult* out_result) { … }
void RecordOptimizationFilterStatus(proto::OptimizationType optimization_type,
OptimizationFilterStatus status) { … }
std::unique_ptr<OptimizationFilter> ProcessOptimizationFilter(
const proto::OptimizationFilter& optimization_filter,
OptimizationFilterStatus* out_status) { … }
}