chromium/extensions/browser/updater/safe_manifest_parser.cc

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

#include "extensions/browser/updater/safe_manifest_parser.h"

#include <memory>
#include <optional>
#include <utility>

#include "base/functional/bind.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/types/expected_macros.h"
#include "base/values.h"
#include "base/version.h"
#include "content/public/browser/browser_thread.h"
#include "services/data_decoder/public/cpp/data_decoder.h"
#include "services/data_decoder/public/cpp/safe_xml_parser.h"

namespace extensions {

GetXmlElementAttribute;
GetXmlElementChildWithTag;
GetXmlElementNamespacePrefix;
GetXmlQualifiedName;
IsXmlElementNamed;

namespace {

constexpr char kExpectedGupdateProtocol[] =;
constexpr char kExpectedGupdateXmlns[] =;

// Helper function that reads in values for a single <app> tag. It returns a
// boolean indicating success or failure. On failure, it writes a error message
// into |result->parse_error|.
bool ParseSingleAppTag(const base::Value& app_element,
                       const std::string& xml_namespace,
                       UpdateManifestResult* result,
                       int* prodversionmin_count) {}

void ParseXmlDone(ParseUpdateManifestCallback callback,
                  data_decoder::DataDecoder::ValueOrError result) {}

}  // namespace

ManifestParseFailure::ManifestParseFailure() = default;

ManifestParseFailure::ManifestParseFailure(const ManifestParseFailure& other) =
    default;

ManifestParseFailure::ManifestParseFailure(std::string error_detail,
                                           ManifestInvalidError error)
    :{}

ManifestParseFailure::~ManifestParseFailure() = default;

UpdateManifestResult::UpdateManifestResult() = default;

UpdateManifestResult::UpdateManifestResult(const UpdateManifestResult& other) =
    default;

UpdateManifestResult::~UpdateManifestResult() = default;

UpdateManifestResults::UpdateManifestResults() = default;

UpdateManifestResults::UpdateManifestResults(
    const UpdateManifestResults& other) = default;

UpdateManifestResults::~UpdateManifestResults() = default;

std::map<std::string, std::vector<const UpdateManifestResult*>>
UpdateManifestResults::GroupSuccessfulByID() const {}

void ParseUpdateManifest(const std::string& xml,
                         ParseUpdateManifestCallback callback) {}

}  // namespace extensions