chromium/third_party/blink/renderer/core/url_pattern/url_pattern_canon.cc

// Copyright 2021 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/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/core/url_pattern/url_pattern_canon.h"

#include "third_party/blink/renderer/core/url_pattern/url_pattern_component.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
#include "third_party/blink/renderer/platform/wtf/text/ascii_ctype.h"
#include "third_party/blink/renderer/platform/wtf/text/string_utf8_adaptor.h"
#include "url/url_canon.h"
#include "url/url_util.h"

namespace blink {
namespace url_pattern {

namespace {

String MaybeStripPrefix(const String& value, StringView prefix) {}

String MaybeStripSuffix(const String& value, StringView suffix) {}

String StringFromCanonOutput(const url::CanonOutput& output,
                             const url::Component& component) {}

}  // anonymous namespace

String CanonicalizeProtocol(const String& input,
                            ValueType type,
                            ExceptionState& exception_state) {}

void CanonicalizeUsernameAndPassword(const String& username,
                                     const String& password,
                                     ValueType type,
                                     String& username_out,
                                     String& password_out,
                                     ExceptionState& exception_state) {}

String CanonicalizeHostname(const String& input,
                            ValueType type,
                            ExceptionState& exception_state) {}

String CanonicalizePort(const String& input,
                        ValueType type,
                        const String& protocol,
                        ExceptionState& exception_state) {}

String CanonicalizePathname(const String& protocol,
                            const String& input,
                            ValueType type,
                            ExceptionState& exception_state) {}

String CanonicalizeSearch(const String& input,
                          ValueType type,
                          ExceptionState& exception_state) {}

String CanonicalizeHash(const String& input,
                        ValueType type,
                        ExceptionState& exception_state) {}

}  // namespace url_pattern
}  // namespace blink