#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[] = …;
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) { … }
}
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) { … }
}