chromium/base/test/metrics/histogram_variants_reader.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 "base/test/metrics/histogram_variants_reader.h"

#include <map>
#include <optional>
#include <string>

#include "base/base_paths.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/libxml/chromium/xml_reader.h"

namespace base {

namespace {

// Extracts single variants block from a histograms.xml.
//
// Expects |reader| to point at the given <variants> element with the name
// `variants_name`.
//
// Returns map { name => summary } on success, and nullopt on failure.
std::optional<HistogramVariantsEntryMap> ParseVariantsFromHistogramsXml(
    const std::string& variants_name,
    XmlReader& reader) {}

}  // namespace

std::optional<HistogramVariantsEntryMap> ReadVariantsFromHistogramsXml(
    const std::string& variants_name,
    const std::string& subdirectory,
    bool from_metadata) {}

}  // namespace base