chromium/chrome/browser/extensions/api/identity/identity_token_cache.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/extensions/api/identity/identity_token_cache.h"

#include <map>
#include <set>

#include "base/ranges/algorithm.h"
#include "chrome/browser/extensions/api/identity/identity_constants.h"

namespace extensions {

IdentityTokenCacheValue::IdentityTokenCacheValue() = default;
IdentityTokenCacheValue::IdentityTokenCacheValue(
    const IdentityTokenCacheValue& other) = default;
IdentityTokenCacheValue& IdentityTokenCacheValue::operator=(
    const IdentityTokenCacheValue& other) = default;
IdentityTokenCacheValue::~IdentityTokenCacheValue() = default;

// static
IdentityTokenCacheValue IdentityTokenCacheValue::CreateRemoteConsent(
    const RemoteConsentResolutionData& resolution_data) {}

// static
IdentityTokenCacheValue IdentityTokenCacheValue::CreateRemoteConsentApproved(
    const std::string& consent_result) {}

// static
IdentityTokenCacheValue IdentityTokenCacheValue::CreateToken(
    const std::string& token,
    const std::set<std::string>& granted_scopes,
    base::TimeDelta time_to_live) {}

IdentityTokenCacheValue::CacheValueStatus IdentityTokenCacheValue::status()
    const {}

IdentityTokenCacheValue::CacheValueStatus
IdentityTokenCacheValue::GetStatusInternal() const {}

bool IdentityTokenCacheValue::is_expired() const {}

const base::Time& IdentityTokenCacheValue::expiration_time() const {}

const RemoteConsentResolutionData& IdentityTokenCacheValue::resolution_data()
    const {}

const std::string& IdentityTokenCacheValue::consent_result() const {}

const std::string& IdentityTokenCacheValue::token() const {}

const std::set<std::string>& IdentityTokenCacheValue::granted_scopes() const {}

IdentityTokenCacheValue::TokenValue::TokenValue(
    const std::string& input_token,
    const std::set<std::string>& input_granted_scopes)
    :{}

IdentityTokenCacheValue::TokenValue::TokenValue(const TokenValue& other) =
    default;
IdentityTokenCacheValue::TokenValue&
IdentityTokenCacheValue::TokenValue::operator=(const TokenValue& other) =
    default;
IdentityTokenCacheValue::TokenValue::~TokenValue() = default;

IdentityTokenCache::AccessTokensKey::AccessTokensKey(
    const ExtensionTokenKey& key)
    :{}

IdentityTokenCache::AccessTokensKey::AccessTokensKey(
    const std::string& extension_id,
    const CoreAccountId& account_id)
    :{}

bool IdentityTokenCache::AccessTokensKey::operator<(
    const AccessTokensKey& rhs) const {}

// Ensure that the access tokens are ordered by scope sizes.
bool IdentityTokenCache::ScopesSizeCompare::operator()(
    const IdentityTokenCacheValue& lhs,
    const IdentityTokenCacheValue& rhs) const {}

IdentityTokenCache::IdentityTokenCache() = default;
IdentityTokenCache::~IdentityTokenCache() = default;

void IdentityTokenCache::SetToken(const ExtensionTokenKey& key,
                                  const IdentityTokenCacheValue& token_data) {}

void IdentityTokenCache::EraseAccessToken(const std::string& extension_id,
                                          const std::string& token) {}

void IdentityTokenCache::EraseAllTokensForExtension(
    const std::string& extension_id) {}

void IdentityTokenCache::EraseAllTokens() {}

const IdentityTokenCacheValue& IdentityTokenCache::GetToken(
    const ExtensionTokenKey& key) {}

const IdentityTokenCache::AccessTokensCache&
IdentityTokenCache::access_tokens_cache() {}

void IdentityTokenCache::EraseStaleTokens() {}

}  // namespace extensions