chromium/url/gurl.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/350788890): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#include "url/gurl.h"

#include <stddef.h>

#include <algorithm>
#include <memory>
#include <ostream>
#include <string_view>
#include <utility>

#include "base/check_op.h"
#include "base/no_destructor.h"
#include "base/notreached.h"
#include "base/strings/string_util.h"
#include "base/trace_event/base_tracing.h"
#include "base/trace_event/memory_usage_estimator.h"
#include "url/url_canon_stdstring.h"
#include "url/url_util.h"

GURL::GURL() :{}

GURL::GURL(const GURL& other)
    :{}

GURL::GURL(GURL&& other) noexcept
    :{}

GURL::GURL(std::string_view url_string) {}

GURL::GURL(std::u16string_view url_string) {}

GURL::GURL(const std::string& url_string, RetainWhiteSpaceSelector) {}

GURL::GURL(const char* canonical_spec,
           size_t canonical_spec_len,
           const url::Parsed& parsed,
           bool is_valid)
    :{}

GURL::GURL(std::string canonical_spec, const url::Parsed& parsed, bool is_valid)
    :{}

template <typename T, typename CharT>
void GURL::InitCanonical(T input_spec, bool trim_path_end) {}

void GURL::InitializeFromCanonicalSpec() {}

GURL::~GURL() = default;

GURL& GURL::operator=(const GURL& other) {}

GURL& GURL::operator=(GURL&& other) noexcept {}

const std::string& GURL::spec() const {}

// Note: code duplicated below (it's inconvenient to use a template here).
GURL GURL::Resolve(std::string_view relative) const {}

// Note: code duplicated above (it's inconvenient to use a template here).
GURL GURL::Resolve(std::u16string_view relative) const {}

// Note: code duplicated below (it's inconvenient to use a template here).
GURL GURL::ReplaceComponents(const Replacements& replacements) const {}

// Note: code duplicated above (it's inconvenient to use a template here).
GURL GURL::ReplaceComponents(const ReplacementsW& replacements) const {}

void GURL::ProcessFileSystemURLAfterReplaceComponents() {}

GURL GURL::DeprecatedGetOriginAsURL() const {}

GURL GURL::GetAsReferrer() const {}

GURL GURL::GetWithEmptyPath() const {}

GURL GURL::GetWithoutFilename() const {}

GURL GURL::GetWithoutRef() const {}

bool GURL::IsStandard() const {}

bool GURL::IsAboutBlank() const {}

bool GURL::IsAboutSrcdoc() const {}

bool GURL::SchemeIs(std::string_view lower_ascii_scheme) const {}

bool GURL::SchemeIsHTTPOrHTTPS() const {}

bool GURL::SchemeIsWSOrWSS() const {}

bool GURL::SchemeIsCryptographic() const {}

bool GURL::SchemeIsCryptographic(std::string_view lower_ascii_scheme) {}

bool GURL::SchemeIsLocal() const {}

int GURL::IntPort() const {}

int GURL::EffectiveIntPort() const {}

std::string GURL::ExtractFileName() const {}

std::string_view GURL::PathForRequestPiece() const {}

std::string GURL::PathForRequest() const {}

std::string GURL::HostNoBrackets() const {}

std::string_view GURL::HostNoBracketsPiece() const {}

std::string GURL::GetContent() const {}

std::string_view GURL::GetContentPiece() const {}

bool GURL::HostIsIPAddress() const {}

const GURL& GURL::EmptyGURL() {}

bool GURL::DomainIs(std::string_view canonical_domain) const {}

bool GURL::EqualsIgnoringRef(const GURL& other) const {}

void GURL::Swap(GURL* other) {}

size_t GURL::EstimateMemoryUsage() const {}

bool GURL::IsAboutUrl(std::string_view allowed_path) const {}

// static
bool GURL::IsAboutPath(std::string_view actual_path,
                       std::string_view allowed_path) {}

void GURL::WriteIntoTrace(perfetto::TracedValue context) const {}

std::ostream& operator<<(std::ostream& out, const GURL& url) {}

bool operator==(const GURL& x, const GURL& y) {}

bool operator==(const GURL& x, std::string_view spec) {}

namespace url::debug {

ScopedUrlCrashKey::ScopedUrlCrashKey(base::debug::CrashKeyString* crash_key,
                                     const GURL& url)
    :{}

ScopedUrlCrashKey::~ScopedUrlCrashKey() = default;

}  // namespace url::debug