chromium/net/base/isolation_info.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 "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 {

// Checks that |origin| is consistent with |site_for_cookies|.
bool ValidateSameSite(const url::Origin& origin,
                      const SiteForCookies& site_for_cookies) {}

// Checks if these values are consistent. See IsolationInfo::Create() for
// descriptions of consistent sets of values. Also allows values used by the
// 0-argument constructor.
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) {}

}  // namespace

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)
    :{}

}  // namespace net