chromium/extensions/common/manifest.cc

// Copyright 2013 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.h"

#include <string_view>
#include <utility>

#include "base/check.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/notreached.h"
#include "base/strings/strcat.h"
#include "base/strings/utf_string_conversions.h"
#include "base/value_iterators.h"
#include "extensions/common/api/shared_module.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/features/feature.h"
#include "extensions/common/features/feature_provider.h"
#include "extensions/common/install_warning.h"
#include "extensions/common/manifest_constants.h"
#include "extensions/common/manifest_handler_helpers.h"

ManifestLocation;

namespace extensions {

keys;

namespace {

// Rank extension locations in a way that allows
// Manifest::GetHigherPriorityLocation() to compare locations.
// An extension installed from two locations will have the location
// with the higher rank, as returned by this function. The actual
// integer values may change, and should never be persisted.
int GetLocationRank(ManifestLocation location) {}

int GetManifestVersion(const base::Value::Dict& manifest_value,
                       Manifest::Type type) {}

// Helper class to filter available values from a manifest.
class AvailableValuesFilter {};

}  // namespace

// static
ManifestLocation Manifest::GetHigherPriorityLocation(ManifestLocation loc1,
                                                     ManifestLocation loc2) {}

// static
Manifest::Type Manifest::GetTypeFromManifestValue(
    const base::Value::Dict& value,
    bool for_login_screen) {}

// static
bool Manifest::ShouldAlwaysLoadExtension(ManifestLocation location,
                                         bool is_theme) {}

// static
std::unique_ptr<Manifest> Manifest::CreateManifestForLoginScreen(
    ManifestLocation location,
    base::Value::Dict value,
    ExtensionId extension_id) {}

Manifest::Manifest(ManifestLocation location,
                   base::Value::Dict value,
                   ExtensionId extension_id)
    :{}

Manifest::Manifest(ManifestLocation location,
                   base::Value::Dict value,
                   ExtensionId extension_id,
                   bool for_login_screen)
    :{}

Manifest::~Manifest() = default;

void Manifest::ValidateManifest(std::vector<InstallWarning>* warnings) const {}

const base::Value* Manifest::FindKey(std::string_view key) const {}

const base::Value* Manifest::FindPath(std::string_view path) const {}

std::optional<bool> Manifest::FindBoolPath(std::string_view path) const {}

std::optional<int> Manifest::FindIntPath(std::string_view path) const {}

const std::string* Manifest::FindStringPath(std::string_view path) const {}

const base::Value::Dict* Manifest::FindDictPath(std::string_view path) const {}

bool Manifest::GetList(const std::string& path,
                       const base::Value** out_value) const {}

bool Manifest::EqualsForTesting(const Manifest& other) const {}

}  // namespace extensions