chromium/extensions/common/permissions/api_permission_set.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/permissions/api_permission_set.h"

#include "base/containers/contains.h"
#include "base/logging.h"
#include "base/ranges/algorithm.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/manifest_constants.h"
#include "extensions/common/permissions/permissions_info.h"

APIPermissionID;

namespace extensions {

errors;

namespace {

// Helper object that is implicitly constructible from both a PermissionID and
// from an mojom::APIPermissionID.
struct PermissionIDCompareHelper {};

bool CreateAPIPermission(const std::string& permission_str,
                         const base::Value* permission_value,
                         APIPermissionSet::ParseSource source,
                         APIPermissionSet* api_permissions,
                         std::u16string* error,
                         std::vector<std::string>* unhandled_permissions) {}

bool ParseChildPermissions(const std::string& base_name,
                           const base::Value* permission_value,
                           APIPermissionSet::ParseSource source,
                           APIPermissionSet* api_permissions,
                           std::u16string* error,
                           std::vector<std::string>* unhandled_permissions) {}

}  // namespace

void APIPermissionSet::insert(APIPermissionID id) {}

void APIPermissionSet::insert(std::unique_ptr<APIPermission> permission) {}

// static
bool APIPermissionSet::ParseFromJSON(
    const base::Value::List& permissions,
    APIPermissionSet::ParseSource source,
    APIPermissionSet* api_permissions,
    std::u16string* error,
    std::vector<std::string>* unhandled_permissions) {}

PermissionID::PermissionID(APIPermissionID id)
    :{}

PermissionID::PermissionID(APIPermissionID id, const std::u16string& parameter)
    :{}

PermissionID::~PermissionID() {}

PermissionIDSet::PermissionIDSet() {}

PermissionIDSet::PermissionIDSet(
    std::initializer_list<APIPermissionID> permissions) {}

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

PermissionIDSet::~PermissionIDSet() {}

void PermissionIDSet::insert(APIPermissionID permission_id) {}

void PermissionIDSet::insert(APIPermissionID permission_id,
                             const std::u16string& permission_detail) {}

void PermissionIDSet::InsertAll(const PermissionIDSet& permission_set) {}

void PermissionIDSet::erase(APIPermissionID permission_id) {}

std::vector<std::u16string> PermissionIDSet::GetAllPermissionParameters()
    const {}

bool PermissionIDSet::ContainsID(PermissionID permission_id) const {}

bool PermissionIDSet::ContainsID(APIPermissionID permission_id) const {}

bool PermissionIDSet::ContainsAllIDs(
    const std::set<APIPermissionID>& permission_ids) const {}

bool PermissionIDSet::ContainsAnyID(
    const std::set<APIPermissionID>& permission_ids) const {}

bool PermissionIDSet::ContainsAnyID(const PermissionIDSet& other) const {}

PermissionIDSet PermissionIDSet::GetAllPermissionsWithID(
    APIPermissionID permission_id) const {}

PermissionIDSet PermissionIDSet::GetAllPermissionsWithIDs(
    const std::set<APIPermissionID>& permission_ids) const {}

bool PermissionIDSet::Includes(const PermissionIDSet& subset) const {}

bool PermissionIDSet::Equals(const PermissionIDSet& set) const {}

// static
PermissionIDSet PermissionIDSet::Difference(const PermissionIDSet& set_1,
                                            const PermissionIDSet& set_2) {}

size_t PermissionIDSet::size() const {}

bool PermissionIDSet::empty() const {}

PermissionIDSet::PermissionIDSet(const std::set<PermissionID>& permissions)
    :{}

}  // namespace extensions