chromium/extensions/common/manifest_handlers/icon_variants_handler.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 "extensions/common/manifest_handlers/icon_variants_handler.h"

#include <memory>
#include <string>

#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "extensions/common/api/icon_variants.h"
#include "extensions/common/extension.h"
#include "extensions/common/icons/extension_icon_variants.h"
#include "extensions/common/icons/extension_icon_variants_diagnostics.h"
#include "extensions/common/manifest_constants.h"

namespace extensions {

IconVariantsInfo::IconVariantsInfo() = default;
IconVariantsInfo::~IconVariantsInfo() = default;

IconVariantsHandler::IconVariantsHandler() = default;
IconVariantsHandler::~IconVariantsHandler() = default;

keys;
IconVariantsManifestKeys;

// extensions::diagnostics::
Id;
Severity;
Feature;

namespace {
void AddInstallWarning(Extension& extension, const std::string& warning) {}

void AddInstallWarningForId(Extension& extension, Id id) {}

// Returns the icon variants parsed from the `extension` manifest.
// Populates `error` if there are no icon variants.
std::unique_ptr<ExtensionIconVariants> GetIconVariants(Extension& extension,
                                                       std::u16string* error) {}
}  // namespace

// static
bool IconVariantsInfo::HasIconVariants(const Extension* extension) {}

const IconVariantsInfo* IconVariantsInfo::GetIconVariants(
    const Extension* extension) {}

// TODO(crbug.com/41419485): Add more test coverage for warnings and errors.
bool IconVariantsHandler::Parse(Extension* extension, std::u16string* error) {}

bool IconVariantsHandler::Validate(
    const Extension* extension,
    std::string* error,
    std::vector<InstallWarning>* warnings) const {}

base::span<const char* const> IconVariantsHandler::Keys() const {}

}  // namespace extensions