#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <string.h>
#include "url/url_canon.h"
#include "url/url_canon_internal.h"
namespace url {
namespace {
inline bool IsRemovableURLWhitespace(int ch) { … }
template <typename CHAR>
const CHAR* DoRemoveURLWhitespace(const CHAR* input,
int input_len,
CanonOutputT<CHAR>* buffer,
int* output_len,
bool* potentially_dangling_markup) { … }
const char kSchemeCanonical[0x80] = …;
inline bool IsSchemeFirstChar(unsigned char c) { … }
template <typename CHAR, typename UCHAR>
bool DoScheme(const CHAR* spec,
const Component& scheme,
CanonOutput* output,
Component* out_scheme) { … }
template <typename CHAR, typename UCHAR>
bool DoUserInfo(const CHAR* username_spec,
const Component& username,
const CHAR* password_spec,
const Component& password,
CanonOutput* output,
Component* out_username,
Component* out_password) { … }
inline void WritePortInt(char* output, int output_len, int port) { … }
template <typename CHAR, typename UCHAR>
bool DoPort(const CHAR* spec,
const Component& port,
int default_port_for_scheme,
CanonOutput* output,
Component* out_port) { … }
const bool kShouldEscapeCharInFragment[0x80] = …;
template <typename CHAR, typename UCHAR>
void DoCanonicalizeRef(const CHAR* spec,
const Component& ref,
CanonOutput* output,
Component* out_ref) { … }
}
const char* RemoveURLWhitespace(const char* input,
int input_len,
CanonOutputT<char>* buffer,
int* output_len,
bool* potentially_dangling_markup) { … }
const char16_t* RemoveURLWhitespace(const char16_t* input,
int input_len,
CanonOutputT<char16_t>* buffer,
int* output_len,
bool* potentially_dangling_markup) { … }
char CanonicalSchemeChar(char16_t ch) { … }
bool CanonicalizeScheme(const char* spec,
const Component& scheme,
CanonOutput* output,
Component* out_scheme) { … }
bool CanonicalizeScheme(const char16_t* spec,
const Component& scheme,
CanonOutput* output,
Component* out_scheme) { … }
bool CanonicalizeUserInfo(const char* username_source,
const Component& username,
const char* password_source,
const Component& password,
CanonOutput* output,
Component* out_username,
Component* out_password) { … }
bool CanonicalizeUserInfo(const char16_t* username_source,
const Component& username,
const char16_t* password_source,
const Component& password,
CanonOutput* output,
Component* out_username,
Component* out_password) { … }
bool CanonicalizePort(const char* spec,
const Component& port,
int default_port_for_scheme,
CanonOutput* output,
Component* out_port) { … }
bool CanonicalizePort(const char16_t* spec,
const Component& port,
int default_port_for_scheme,
CanonOutput* output,
Component* out_port) { … }
void CanonicalizeRef(const char* spec,
const Component& ref,
CanonOutput* output,
Component* out_ref) { … }
void CanonicalizeRef(const char16_t* spec,
const Component& ref,
CanonOutput* output,
Component* out_ref) { … }
}