chromium/net/base/schemeful_site.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/schemeful_site.h"

#include "base/check.h"
#include "base/metrics/histogram_macros.h"
#include "base/trace_event/memory_usage_estimator.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "net/base/url_util.h"
#include "url/gurl.h"
#include "url/url_canon.h"
#include "url/url_constants.h"

namespace net {

// Return a tuple containing:
// * a new origin using the registerable domain of `origin` if possible and
//   a port of 0; otherwise, the passed-in origin.
// * a bool indicating whether `origin` had a non-null registerable domain.
//   (False if `origin` was opaque.)
//
// Follows steps specified in
// https://html.spec.whatwg.org/multipage/origin.html#obtain-a-site
SchemefulSite::ObtainASiteResult SchemefulSite::ObtainASite(
    const url::Origin& origin) {}

SchemefulSite::SchemefulSite(ObtainASiteResult result)
    :{}

SchemefulSite::SchemefulSite(const url::Origin& origin)
    :{}

SchemefulSite::SchemefulSite(const GURL& url)
    :{}

SchemefulSite::SchemefulSite(const SchemefulSite& other) = default;
SchemefulSite::SchemefulSite(SchemefulSite&& other) noexcept = default;

SchemefulSite& SchemefulSite::operator=(const SchemefulSite& other) = default;
SchemefulSite& SchemefulSite::operator=(SchemefulSite&& other) noexcept =
    default;

// static
bool SchemefulSite::FromWire(const url::Origin& site_as_origin,
                             SchemefulSite* out) {}

std::optional<SchemefulSite> SchemefulSite::CreateIfHasRegisterableDomain(
    const url::Origin& origin) {}

void SchemefulSite::ConvertWebSocketToHttp() {}

// static
SchemefulSite SchemefulSite::Deserialize(const std::string& value) {}

std::string SchemefulSite::Serialize() const {}

std::string SchemefulSite::SerializeFileSiteWithHost() const {}

std::string SchemefulSite::GetDebugString() const {}

GURL SchemefulSite::GetURL() const {}

const url::Origin& SchemefulSite::GetInternalOriginForTesting() const {}

size_t SchemefulSite::EstimateMemoryUsage() const {}

bool SchemefulSite::operator==(const SchemefulSite& other) const {}

bool SchemefulSite::operator!=(const SchemefulSite& other) const {}

// Allows SchemefulSite to be used as a key in STL containers (for example, a
// std::set or std::map).
bool SchemefulSite::operator<(const SchemefulSite& other) const {}

// static
std::optional<SchemefulSite> SchemefulSite::DeserializeWithNonce(
    base::PassKey<NetworkAnonymizationKey>,
    const std::string& value) {}

// static
std::optional<SchemefulSite> SchemefulSite::DeserializeWithNonce(
    const std::string& value) {}

std::optional<std::string> SchemefulSite::SerializeWithNonce(
    base::PassKey<NetworkAnonymizationKey>) {}

std::optional<std::string> SchemefulSite::SerializeWithNonce() {}

bool SchemefulSite::SchemelesslyEqual(const SchemefulSite& other) const {}

std::ostream& operator<<(std::ostream& os, const SchemefulSite& ss) {}

}  // namespace net