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

#include <memory>
#include <utility>
#include <vector>

#include "base/containers/contains.h"
#include "base/memory/ptr_util.h"
#include "extensions/common/permissions/permissions_info.h"
#include "extensions/common/url_pattern.h"
#include "url/gurl.h"

APIPermissionID;

namespace extensions {

PermissionSet::PermissionSet() = default;
PermissionSet::PermissionSet(APIPermissionSet apis,
                             ManifestPermissionSet manifest_permissions,
                             URLPatternSet explicit_hosts,
                             URLPatternSet scriptable_hosts)
    :{}

PermissionSet::~PermissionSet() = default;

PermissionSet::PermissionSet(PermissionSet&& other) = default;

PermissionSet& PermissionSet::operator=(PermissionSet&& other) = default;

// static
std::unique_ptr<PermissionSet> PermissionSet::CreateDifference(
    const PermissionSet& set1,
    const PermissionSet& set2) {}

// static
std::unique_ptr<PermissionSet> PermissionSet::CreateIntersection(
    const PermissionSet& set1,
    const PermissionSet& set2,
    URLPatternSet::IntersectionBehavior intersection_behavior) {}

// static
std::unique_ptr<PermissionSet> PermissionSet::CreateUnion(
    const PermissionSet& set1,
    const PermissionSet& set2) {}

bool PermissionSet::operator==(
    const PermissionSet& rhs) const {}

bool PermissionSet::operator!=(const PermissionSet& rhs) const {}

std::unique_ptr<PermissionSet> PermissionSet::Clone() const {}

bool PermissionSet::Contains(const PermissionSet& set) const {}

std::set<std::string> PermissionSet::GetAPIsAsStrings() const {}

bool PermissionSet::IsEmpty() const {}

bool PermissionSet::HasAPIPermission(APIPermissionID id) const {}

bool PermissionSet::HasAPIPermission(const std::string& permission_name) const {}

bool PermissionSet::CheckAPIPermission(APIPermissionID permission) const {}

bool PermissionSet::CheckAPIPermissionWithParam(
    APIPermissionID permission,
    const APIPermission::CheckParam* param) const {}

bool PermissionSet::HasExplicitAccessToOrigin(
    const GURL& origin) const {}

bool PermissionSet::HasEffectiveAccessToAllHosts() const {}

bool PermissionSet::ShouldWarnAllHosts(bool include_api_permissions) const {}

bool PermissionSet::HasEffectiveAccessToURL(const GURL& url) const {}

void PermissionSet::SetAPIPermissions(APIPermissionSet new_apis) {}

void PermissionSet::SetManifestPermissions(
    ManifestPermissionSet new_manifest_permissions) {}

void PermissionSet::SetExplicitHosts(URLPatternSet new_explicit_hosts) {}

void PermissionSet::SetScriptableHosts(URLPatternSet new_scriptable_hosts) {}

PermissionSet::PermissionSet(const PermissionSet& other)
    :{}

void PermissionSet::CleanExplicitHostPaths() {}

void PermissionSet::InitEffectiveHosts() {}

void PermissionSet::InitShouldWarnAllHostsForHostPermissions() const {}

void PermissionSet::InitShouldWarnAllHostsForAPIPermissions() const {}

}  // namespace extensions