#include "net/base/network_anonymization_key.h"
#include <atomic>
#include <optional>
#include "base/feature_list.h"
#include "base/unguessable_token.h"
#include "base/values.h"
#include "net/base/features.h"
#include "net/base/net_export.h"
#include "net/base/network_isolation_key.h"
#include "net/base/schemeful_site.h"
#include "net/cookies/site_for_cookies.h"
namespace net {
namespace {
bool g_partition_by_default = …;
ABSL_CONST_INIT std::atomic<bool> g_partition_by_default_locked = …;
}
NetworkAnonymizationKey::NetworkAnonymizationKey(
const SchemefulSite& top_frame_site,
bool is_cross_site,
std::optional<base::UnguessableToken> nonce)
: … { … }
NetworkAnonymizationKey NetworkAnonymizationKey::CreateFromFrameSite(
const SchemefulSite& top_frame_site,
const SchemefulSite& frame_site,
std::optional<base::UnguessableToken> nonce) { … }
NetworkAnonymizationKey NetworkAnonymizationKey::CreateFromNetworkIsolationKey(
const net::NetworkIsolationKey& network_isolation_key) { … }
NetworkAnonymizationKey::NetworkAnonymizationKey()
: … { … }
NetworkAnonymizationKey::NetworkAnonymizationKey(
const NetworkAnonymizationKey& network_anonymization_key) = default;
NetworkAnonymizationKey::NetworkAnonymizationKey(
NetworkAnonymizationKey&& network_anonymization_key) = default;
NetworkAnonymizationKey::~NetworkAnonymizationKey() = default;
NetworkAnonymizationKey& NetworkAnonymizationKey::operator=(
const NetworkAnonymizationKey& network_anonymization_key) = default;
NetworkAnonymizationKey& NetworkAnonymizationKey::operator=(
NetworkAnonymizationKey&& network_anonymization_key) = default;
NetworkAnonymizationKey NetworkAnonymizationKey::CreateTransient() { … }
std::string NetworkAnonymizationKey::ToDebugString() const { … }
bool NetworkAnonymizationKey::IsEmpty() const { … }
bool NetworkAnonymizationKey::IsFullyPopulated() const { … }
bool NetworkAnonymizationKey::IsTransient() const { … }
bool NetworkAnonymizationKey::ToValue(base::Value* out_value) const { … }
bool NetworkAnonymizationKey::FromValue(
const base::Value& value,
NetworkAnonymizationKey* network_anonymization_key) { … }
std::string NetworkAnonymizationKey::GetSiteDebugString(
const std::optional<SchemefulSite>& site) const { … }
std::optional<std::string> NetworkAnonymizationKey::SerializeSiteWithNonce(
const SchemefulSite& site) { … }
bool NetworkAnonymizationKey::IsPartitioningEnabled() { … }
void NetworkAnonymizationKey::PartitionByDefault() { … }
void NetworkAnonymizationKey::ClearGlobalsForTesting() { … }
NET_EXPORT std::ostream& operator<<(std::ostream& os,
const NetworkAnonymizationKey& nak) { … }
}