#include "net/base/isolation_info.h"
#include <cstddef>
#include <optional>
#include "base/check_op.h"
#include "base/unguessable_token.h"
#include "net/base/features.h"
#include "net/base/isolation_info.h"
#include "net/base/isolation_info.pb.h"
#include "net/base/network_anonymization_key.h"
#include "net/base/proxy_server.h"
namespace net {
namespace {
bool ValidateSameSite(const url::Origin& origin,
const SiteForCookies& site_for_cookies) { … }
bool IsConsistent(IsolationInfo::RequestType request_type,
const std::optional<url::Origin>& top_frame_origin,
const std::optional<url::Origin>& frame_origin,
const SiteForCookies& site_for_cookies,
const std::optional<base::UnguessableToken>& nonce) { … }
}
IsolationInfo::IsolationInfo()
: … { … }
IsolationInfo::IsolationInfo(const IsolationInfo&) = default;
IsolationInfo::IsolationInfo(IsolationInfo&&) = default;
IsolationInfo::~IsolationInfo() = default;
IsolationInfo& IsolationInfo::operator=(const IsolationInfo&) = default;
IsolationInfo& IsolationInfo::operator=(IsolationInfo&&) = default;
IsolationInfo IsolationInfo::CreateForInternalRequest(
const url::Origin& top_frame_origin) { … }
IsolationInfo IsolationInfo::CreateTransient() { … }
IsolationInfo IsolationInfo::CreateTransientWithNonce(
const base::UnguessableToken& nonce) { … }
std::optional<IsolationInfo> IsolationInfo::Deserialize(
const std::string& serialized) { … }
IsolationInfo IsolationInfo::Create(
RequestType request_type,
const url::Origin& top_frame_origin,
const url::Origin& frame_origin,
const SiteForCookies& site_for_cookies,
const std::optional<base::UnguessableToken>& nonce) { … }
IsolationInfo IsolationInfo::DoNotUseCreatePartialFromNak(
const net::NetworkAnonymizationKey& network_anonymization_key) { … }
std::optional<IsolationInfo> IsolationInfo::CreateIfConsistent(
RequestType request_type,
const std::optional<url::Origin>& top_frame_origin,
const std::optional<url::Origin>& frame_origin,
const SiteForCookies& site_for_cookies,
const std::optional<base::UnguessableToken>& nonce) { … }
IsolationInfo IsolationInfo::CreateForRedirect(
const url::Origin& new_origin) const { … }
const std::optional<url::Origin>& IsolationInfo::frame_origin() const { … }
bool IsolationInfo::IsEqualForTesting(const IsolationInfo& other) const { … }
std::string IsolationInfo::Serialize() const { … }
std::string IsolationInfo::DebugString() const { … }
IsolationInfo::IsolationInfo(RequestType request_type,
const std::optional<url::Origin>& top_frame_origin,
const std::optional<url::Origin>& frame_origin,
const SiteForCookies& site_for_cookies,
const std::optional<base::UnguessableToken>& nonce)
: … { … }
}