diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-30 00:45:48 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-30 00:45:48 +0000 |
commit | 7394c6dfcd1d490dc4ca753bbab2443ac6517282 (patch) | |
tree | 4f585d0cc81df0fe030dab062dc9e742c1f6af4f /url | |
parent | 15b05a7d37381e8487fb7eebf2d90355a8774431 (diff) | |
download | chromium_src-7394c6dfcd1d490dc4ca753bbab2443ac6517282.zip chromium_src-7394c6dfcd1d490dc4ca753bbab2443ac6517282.tar.gz chromium_src-7394c6dfcd1d490dc4ca753bbab2443ac6517282.tar.bz2 |
Revert 203025 "Make the copy of GURL in src/url buildable as a c..."
> Make the copy of GURL in src/url buildable as a component build. (try 2)
>
> BUG=229660
> TBR=brettw
>
> Review URL: https://chromiumcodereview.appspot.com/15805003
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/15848009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203027 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'url')
-rw-r--r-- | url/gurl.h | 11 | ||||
-rw-r--r-- | url/url.gyp | 14 | ||||
-rw-r--r-- | url/url_canon.h | 487 | ||||
-rw-r--r-- | url/url_canon_icu.h | 3 | ||||
-rw-r--r-- | url/url_canon_internal.h | 25 | ||||
-rw-r--r-- | url/url_canon_ip.h | 37 | ||||
-rw-r--r-- | url/url_export.h | 33 | ||||
-rw-r--r-- | url/url_parse.h | 104 | ||||
-rw-r--r-- | url/url_util.h | 117 |
9 files changed, 391 insertions, 440 deletions
@@ -11,10 +11,9 @@ #include "base/string16.h" #include "url/url_canon.h" #include "url/url_canon_stdstring.h" -#include "url/url_export.h" #include "url/url_parse.h" -class URL_EXPORT GURL { +class GURL { public: typedef url_canon::StdStringReplacements<std::string> Replacements; typedef url_canon::StdStringReplacements<string16> ReplacementsW; @@ -33,8 +32,10 @@ class URL_EXPORT GURL { // encode the query parameters. It is probably sufficient for the narrow // version to assume the query parameter encoding should be the same as the // input encoding. - explicit GURL(const std::string& url_string /*, output_param_encoding*/); - explicit GURL(const string16& url_string /*, output_param_encoding*/); + explicit GURL(const std::string& url_string + /*, output_param_encoding*/); + explicit GURL(const string16& url_string + /*, output_param_encoding*/); // Constructor for URLs that have already been parsed and canonicalized. This // is used for conversions from KURL, for example. The caller must supply all @@ -360,6 +361,6 @@ class URL_EXPORT GURL { }; // Stream operator so GURL can be used in assertion statements. -URL_EXPORT std::ostream& operator<<(std::ostream& out, const GURL& url); +std::ostream& operator<<(std::ostream& out, const GURL& url); #endif // URL_GURL_H_ diff --git a/url/url.gyp b/url/url.gyp index 5066899..0434669 100644 --- a/url/url.gyp +++ b/url/url.gyp @@ -8,11 +8,8 @@ }, 'targets': [ { - # Note, this target_name cannot be 'url', because that will generate - # 'url.dll' for a Windows component build, and that will confuse Windows, - # which has a system DLL with the same name. - 'target_name': 'url_lib', - 'type': '<(component)', + 'target_name': 'url', + 'type': 'static_library', 'dependencies': [ '../base/base.gyp:base', '../third_party/icu/icu.gyp:icudata', @@ -55,7 +52,7 @@ ], }, 'defines': [ - 'URL_IMPLEMENTATION', + 'FULL_FILESYSTEM_URL_SUPPORT=1', ], # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 'msvs_disabled_warnings': [4267, ], @@ -68,7 +65,7 @@ '../base/base.gyp:run_all_unittests', '../testing/gtest.gyp:gtest', '../third_party/icu/icu.gyp:icuuc', - 'url_lib', + 'url', ], 'sources': [ 'gurl_unittest.cc', @@ -77,6 +74,9 @@ 'url_test_utils.h', 'url_util_unittest.cc', ], + 'defines': [ + 'FULL_FILESYSTEM_URL_SUPPORT=1', + ], 'conditions': [ ['os_posix==1 and OS!="mac" and OS!="ios"', { diff --git a/url/url_canon.h b/url/url_canon.h index 7d4b75a..9987b95 100644 --- a/url/url_canon.h +++ b/url/url_canon.h @@ -9,7 +9,6 @@ #include <string.h> #include "base/string16.h" -#include "url/url_export.h" #include "url/url_parse.h" namespace url_canon { @@ -187,7 +186,7 @@ class RawCanonOutputW : public RawCanonOutputT<char16, fixed_capacity> {}; // // Embedders will want to see the unit test for the ICU version. -class URL_EXPORT CharsetConverter { +class CharsetConverter { public: CharsetConverter() {} virtual ~CharsetConverter() {} @@ -225,12 +224,12 @@ class URL_EXPORT CharsetConverter { // // Therefore, callers should not use the buffer, since it may actuall be empty, // use the computed pointer and |*output_len| instead. -URL_EXPORT const char* RemoveURLWhitespace(const char* input, int input_len, - CanonOutputT<char>* buffer, - int* output_len); -URL_EXPORT const char16* RemoveURLWhitespace(const char16* input, int input_len, - CanonOutputT<char16>* buffer, - int* output_len); +const char* RemoveURLWhitespace(const char* input, int input_len, + CanonOutputT<char>* buffer, + int* output_len); +const char16* RemoveURLWhitespace(const char16* input, int input_len, + CanonOutputT<char16>* buffer, + int* output_len); // IDN ------------------------------------------------------------------------ @@ -243,9 +242,7 @@ URL_EXPORT const char16* RemoveURLWhitespace(const char16* input, int input_len, // the length of the output will be set to the length of the new host name. // // On error, returns false. The output in this case is undefined. -URL_EXPORT bool IDNToASCII(const char16* src, - int src_len, - CanonOutputW* output); +bool IDNToASCII(const char16* src, int src_len, CanonOutputW* output); // Piece-by-piece canonicalizers ---------------------------------------------- // @@ -271,14 +268,14 @@ URL_EXPORT bool IDNToASCII(const char16* src, // URLs. // // The 8-bit version requires UTF-8 encoding. -URL_EXPORT bool CanonicalizeScheme(const char* spec, - const url_parse::Component& scheme, - CanonOutput* output, - url_parse::Component* out_scheme); -URL_EXPORT bool CanonicalizeScheme(const char16* spec, - const url_parse::Component& scheme, - CanonOutput* output, - url_parse::Component* out_scheme); +bool CanonicalizeScheme(const char* spec, + const url_parse::Component& scheme, + CanonOutput* output, + url_parse::Component* out_scheme); +bool CanonicalizeScheme(const char16* spec, + const url_parse::Component& scheme, + CanonOutput* output, + url_parse::Component* out_scheme); // User info: username/password. If present, this will add the delimiters so // the output will be "<username>:<password>@" or "<username>@". Empty @@ -290,20 +287,20 @@ URL_EXPORT bool CanonicalizeScheme(const char16* spec, // is legal as long as the two components don't overlap. // // The 8-bit version requires UTF-8 encoding. -URL_EXPORT bool CanonicalizeUserInfo(const char* username_source, - const url_parse::Component& username, - const char* password_source, - const url_parse::Component& password, - CanonOutput* output, - url_parse::Component* out_username, - url_parse::Component* out_password); -URL_EXPORT bool CanonicalizeUserInfo(const char16* username_source, - const url_parse::Component& username, - const char16* password_source, - const url_parse::Component& password, - CanonOutput* output, - url_parse::Component* out_username, - url_parse::Component* out_password); +bool CanonicalizeUserInfo(const char* username_source, + const url_parse::Component& username, + const char* password_source, + const url_parse::Component& password, + CanonOutput* output, + url_parse::Component* out_username, + url_parse::Component* out_password); +bool CanonicalizeUserInfo(const char16* username_source, + const url_parse::Component& username, + const char16* password_source, + const url_parse::Component& password, + CanonOutput* output, + url_parse::Component* out_username, + url_parse::Component* out_password); // This structure holds detailed state exported from the IP/Host canonicalizers. @@ -356,27 +353,27 @@ struct CanonHostInfo { // // The 8-bit version requires UTF-8 encoding. Use this version when you only // need to know whether canonicalization succeeded. -URL_EXPORT bool CanonicalizeHost(const char* spec, - const url_parse::Component& host, - CanonOutput* output, - url_parse::Component* out_host); -URL_EXPORT bool CanonicalizeHost(const char16* spec, - const url_parse::Component& host, - CanonOutput* output, - url_parse::Component* out_host); +bool CanonicalizeHost(const char* spec, + const url_parse::Component& host, + CanonOutput* output, + url_parse::Component* out_host); +bool CanonicalizeHost(const char16* spec, + const url_parse::Component& host, + CanonOutput* output, + url_parse::Component* out_host); // Extended version of CanonicalizeHost, which returns additional information. // Use this when you need to know whether the hostname was an IP address. // A successful return is indicated by host_info->family != BROKEN. See the // definition of CanonHostInfo above for details. -URL_EXPORT void CanonicalizeHostVerbose(const char* spec, - const url_parse::Component& host, - CanonOutput* output, - CanonHostInfo* host_info); -URL_EXPORT void CanonicalizeHostVerbose(const char16* spec, - const url_parse::Component& host, - CanonOutput* output, - CanonHostInfo* host_info); +void CanonicalizeHostVerbose(const char* spec, + const url_parse::Component& host, + CanonOutput* output, + CanonHostInfo* host_info); +void CanonicalizeHostVerbose(const char16* spec, + const url_parse::Component& host, + CanonOutput* output, + CanonHostInfo* host_info); // IP addresses. @@ -389,34 +386,34 @@ URL_EXPORT void CanonicalizeHostVerbose(const char16* spec, // This is called AUTOMATICALLY from the host canonicalizer, which ensures that // the input is unescaped and name-prepped, etc. It should not normally be // necessary or wise to call this directly. -URL_EXPORT void CanonicalizeIPAddress(const char* spec, - const url_parse::Component& host, - CanonOutput* output, - CanonHostInfo* host_info); -URL_EXPORT void CanonicalizeIPAddress(const char16* spec, - const url_parse::Component& host, - CanonOutput* output, - CanonHostInfo* host_info); +void CanonicalizeIPAddress(const char* spec, + const url_parse::Component& host, + CanonOutput* output, + CanonHostInfo* host_info); +void CanonicalizeIPAddress(const char16* spec, + const url_parse::Component& host, + CanonOutput* output, + CanonHostInfo* host_info); // Port: this function will add the colon for the port if a port is present. // The caller can pass url_parse::PORT_UNSPECIFIED as the // default_port_for_scheme argument if there is no default port. // // The 8-bit version requires UTF-8 encoding. -URL_EXPORT bool CanonicalizePort(const char* spec, - const url_parse::Component& port, - int default_port_for_scheme, - CanonOutput* output, - url_parse::Component* out_port); -URL_EXPORT bool CanonicalizePort(const char16* spec, - const url_parse::Component& port, - int default_port_for_scheme, - CanonOutput* output, - url_parse::Component* out_port); +bool CanonicalizePort(const char* spec, + const url_parse::Component& port, + int default_port_for_scheme, + CanonOutput* output, + url_parse::Component* out_port); +bool CanonicalizePort(const char16* spec, + const url_parse::Component& port, + int default_port_for_scheme, + CanonOutput* output, + url_parse::Component* out_port); // Returns the default port for the given canonical scheme, or PORT_UNSPECIFIED // if the scheme is unknown. -URL_EXPORT int DefaultPortForScheme(const char* scheme, int scheme_len); +int DefaultPortForScheme(const char* scheme, int scheme_len); // Path. If the input does not begin in a slash (including if the input is // empty), we'll prepend a slash to the path to make it canonical. @@ -427,14 +424,14 @@ URL_EXPORT int DefaultPortForScheme(const char* scheme, int scheme_len); // an issue. Somebody giving us an 8-bit path is responsible for generating // the path that the server expects (we'll escape high-bit characters), so // if something is invalid, it's their problem. -URL_EXPORT bool CanonicalizePath(const char* spec, - const url_parse::Component& path, - CanonOutput* output, - url_parse::Component* out_path); -URL_EXPORT bool CanonicalizePath(const char16* spec, - const url_parse::Component& path, - CanonOutput* output, - url_parse::Component* out_path); +bool CanonicalizePath(const char* spec, + const url_parse::Component& path, + CanonOutput* output, + url_parse::Component* out_path); +bool CanonicalizePath(const char16* spec, + const url_parse::Component& path, + CanonOutput* output, + url_parse::Component* out_path); // Canonicalizes the input as a file path. This is like CanonicalizePath except // that it also handles Windows drive specs. For example, the path can begin @@ -442,14 +439,14 @@ URL_EXPORT bool CanonicalizePath(const char16* spec, // The string will be appended to |*output| and |*out_path| will be updated. // // The 8-bit version requires UTF-8 encoding. -URL_EXPORT bool FileCanonicalizePath(const char* spec, - const url_parse::Component& path, - CanonOutput* output, - url_parse::Component* out_path); -URL_EXPORT bool FileCanonicalizePath(const char16* spec, - const url_parse::Component& path, - CanonOutput* output, - url_parse::Component* out_path); +bool FileCanonicalizePath(const char* spec, + const url_parse::Component& path, + CanonOutput* output, + url_parse::Component* out_path); +bool FileCanonicalizePath(const char16* spec, + const url_parse::Component& path, + CanonOutput* output, + url_parse::Component* out_path); // Query: Prepends the ? if needed. // @@ -463,16 +460,16 @@ URL_EXPORT bool FileCanonicalizePath(const char16* spec, // if necessary, for ASCII input, no conversions are necessary. // // The converter can be NULL. In this case, the output encoding will be UTF-8. -URL_EXPORT void CanonicalizeQuery(const char* spec, - const url_parse::Component& query, - CharsetConverter* converter, - CanonOutput* output, - url_parse::Component* out_query); -URL_EXPORT void CanonicalizeQuery(const char16* spec, - const url_parse::Component& query, - CharsetConverter* converter, - CanonOutput* output, - url_parse::Component* out_query); +void CanonicalizeQuery(const char* spec, + const url_parse::Component& query, + CharsetConverter* converter, + CanonOutput* output, + url_parse::Component* out_query); +void CanonicalizeQuery(const char16* spec, + const url_parse::Component& query, + CharsetConverter* converter, + CanonOutput* output, + url_parse::Component* out_query); // Ref: Prepends the # if needed. The output will be UTF-8 (this is the only // canonicalizer that does not produce ASCII output). The output is @@ -480,14 +477,14 @@ URL_EXPORT void CanonicalizeQuery(const char16* spec, // // This function will not fail. If the input is invalid UTF-8/UTF-16, we'll use // the "Unicode replacement character" for the confusing bits and copy the rest. -URL_EXPORT void CanonicalizeRef(const char* spec, - const url_parse::Component& path, - CanonOutput* output, - url_parse::Component* out_path); -URL_EXPORT void CanonicalizeRef(const char16* spec, - const url_parse::Component& path, - CanonOutput* output, - url_parse::Component* out_path); +void CanonicalizeRef(const char* spec, + const url_parse::Component& path, + CanonOutput* output, + url_parse::Component* out_path); +void CanonicalizeRef(const char16* spec, + const url_parse::Component& path, + CanonOutput* output, + url_parse::Component* out_path); // Full canonicalizer --------------------------------------------------------- // @@ -500,75 +497,75 @@ URL_EXPORT void CanonicalizeRef(const char16* spec, // The 8-bit versions require UTF-8 encoding. // Use for standard URLs with authorities and paths. -URL_EXPORT bool CanonicalizeStandardURL(const char* spec, - int spec_len, - const url_parse::Parsed& parsed, - CharsetConverter* query_converter, - CanonOutput* output, - url_parse::Parsed* new_parsed); -URL_EXPORT bool CanonicalizeStandardURL(const char16* spec, - int spec_len, - const url_parse::Parsed& parsed, - CharsetConverter* query_converter, - CanonOutput* output, - url_parse::Parsed* new_parsed); +bool CanonicalizeStandardURL(const char* spec, + int spec_len, + const url_parse::Parsed& parsed, + CharsetConverter* query_converter, + CanonOutput* output, + url_parse::Parsed* new_parsed); +bool CanonicalizeStandardURL(const char16* spec, + int spec_len, + const url_parse::Parsed& parsed, + CharsetConverter* query_converter, + CanonOutput* output, + url_parse::Parsed* new_parsed); // Use for file URLs. -URL_EXPORT bool CanonicalizeFileURL(const char* spec, - int spec_len, - const url_parse::Parsed& parsed, - CharsetConverter* query_converter, - CanonOutput* output, - url_parse::Parsed* new_parsed); -URL_EXPORT bool CanonicalizeFileURL(const char16* spec, - int spec_len, - const url_parse::Parsed& parsed, - CharsetConverter* query_converter, - CanonOutput* output, - url_parse::Parsed* new_parsed); +bool CanonicalizeFileURL(const char* spec, + int spec_len, + const url_parse::Parsed& parsed, + CharsetConverter* query_converter, + CanonOutput* output, + url_parse::Parsed* new_parsed); +bool CanonicalizeFileURL(const char16* spec, + int spec_len, + const url_parse::Parsed& parsed, + CharsetConverter* query_converter, + CanonOutput* output, + url_parse::Parsed* new_parsed); // Use for filesystem URLs. -URL_EXPORT bool CanonicalizeFileSystemURL(const char* spec, - int spec_len, - const url_parse::Parsed& parsed, - CharsetConverter* query_converter, - CanonOutput* output, - url_parse::Parsed* new_parsed); -URL_EXPORT bool CanonicalizeFileSystemURL(const char16* spec, - int spec_len, - const url_parse::Parsed& parsed, - CharsetConverter* query_converter, - CanonOutput* output, - url_parse::Parsed* new_parsed); +bool CanonicalizeFileSystemURL(const char* spec, + int spec_len, + const url_parse::Parsed& parsed, + CharsetConverter* query_converter, + CanonOutput* output, + url_parse::Parsed* new_parsed); +bool CanonicalizeFileSystemURL(const char16* spec, + int spec_len, + const url_parse::Parsed& parsed, + CharsetConverter* query_converter, + CanonOutput* output, + url_parse::Parsed* new_parsed); // Use for path URLs such as javascript. This does not modify the path in any // way, for example, by escaping it. -URL_EXPORT bool CanonicalizePathURL(const char* spec, - int spec_len, - const url_parse::Parsed& parsed, - CanonOutput* output, - url_parse::Parsed* new_parsed); -URL_EXPORT bool CanonicalizePathURL(const char16* spec, - int spec_len, - const url_parse::Parsed& parsed, - CanonOutput* output, - url_parse::Parsed* new_parsed); +bool CanonicalizePathURL(const char* spec, + int spec_len, + const url_parse::Parsed& parsed, + CanonOutput* output, + url_parse::Parsed* new_parsed); +bool CanonicalizePathURL(const char16* spec, + int spec_len, + const url_parse::Parsed& parsed, + CanonOutput* output, + url_parse::Parsed* new_parsed); // Use for mailto URLs. This "canonicalizes" the url into a path and query // component. It does not attempt to merge "to" fields. It uses UTF-8 for // the query encoding if there is a query. This is because a mailto URL is // really intended for an external mail program, and the encoding of a page, // etc. which would influence a query encoding normally are irrelevant. -URL_EXPORT bool CanonicalizeMailtoURL(const char* spec, - int spec_len, - const url_parse::Parsed& parsed, - CanonOutput* output, - url_parse::Parsed* new_parsed); -URL_EXPORT bool CanonicalizeMailtoURL(const char16* spec, - int spec_len, - const url_parse::Parsed& parsed, - CanonOutput* output, - url_parse::Parsed* new_parsed); +bool CanonicalizeMailtoURL(const char* spec, + int spec_len, + const url_parse::Parsed& parsed, + CanonOutput* output, + url_parse::Parsed* new_parsed); +bool CanonicalizeMailtoURL(const char16* spec, + int spec_len, + const url_parse::Parsed& parsed, + CanonOutput* output, + url_parse::Parsed* new_parsed); // Part replacer -------------------------------------------------------------- @@ -753,74 +750,74 @@ class Replacements { }; // The base must be an 8-bit canonical URL. -URL_EXPORT bool ReplaceStandardURL(const char* base, - const url_parse::Parsed& base_parsed, - const Replacements<char>& replacements, - CharsetConverter* query_converter, - CanonOutput* output, - url_parse::Parsed* new_parsed); -URL_EXPORT bool ReplaceStandardURL(const char* base, - const url_parse::Parsed& base_parsed, - const Replacements<char16>& replacements, - CharsetConverter* query_converter, - CanonOutput* output, - url_parse::Parsed* new_parsed); +bool ReplaceStandardURL(const char* base, + const url_parse::Parsed& base_parsed, + const Replacements<char>& replacements, + CharsetConverter* query_converter, + CanonOutput* output, + url_parse::Parsed* new_parsed); +bool ReplaceStandardURL(const char* base, + const url_parse::Parsed& base_parsed, + const Replacements<char16>& replacements, + CharsetConverter* query_converter, + CanonOutput* output, + url_parse::Parsed* new_parsed); // Filesystem URLs can only have the path, query, or ref replaced. // All other components will be ignored. -URL_EXPORT bool ReplaceFileSystemURL(const char* base, - const url_parse::Parsed& base_parsed, - const Replacements<char>& replacements, - CharsetConverter* query_converter, - CanonOutput* output, - url_parse::Parsed* new_parsed); -URL_EXPORT bool ReplaceFileSystemURL(const char* base, - const url_parse::Parsed& base_parsed, - const Replacements<char16>& replacements, - CharsetConverter* query_converter, - CanonOutput* output, - url_parse::Parsed* new_parsed); +bool ReplaceFileSystemURL(const char* base, + const url_parse::Parsed& base_parsed, + const Replacements<char>& replacements, + CharsetConverter* query_converter, + CanonOutput* output, + url_parse::Parsed* new_parsed); +bool ReplaceFileSystemURL(const char* base, + const url_parse::Parsed& base_parsed, + const Replacements<char16>& replacements, + CharsetConverter* query_converter, + CanonOutput* output, + url_parse::Parsed* new_parsed); // Replacing some parts of a file URL is not permitted. Everything except // the host, path, query, and ref will be ignored. -URL_EXPORT bool ReplaceFileURL(const char* base, - const url_parse::Parsed& base_parsed, - const Replacements<char>& replacements, - CharsetConverter* query_converter, - CanonOutput* output, - url_parse::Parsed* new_parsed); -URL_EXPORT bool ReplaceFileURL(const char* base, - const url_parse::Parsed& base_parsed, - const Replacements<char16>& replacements, - CharsetConverter* query_converter, - CanonOutput* output, - url_parse::Parsed* new_parsed); +bool ReplaceFileURL(const char* base, + const url_parse::Parsed& base_parsed, + const Replacements<char>& replacements, + CharsetConverter* query_converter, + CanonOutput* output, + url_parse::Parsed* new_parsed); +bool ReplaceFileURL(const char* base, + const url_parse::Parsed& base_parsed, + const Replacements<char16>& replacements, + CharsetConverter* query_converter, + CanonOutput* output, + url_parse::Parsed* new_parsed); // Path URLs can only have the scheme and path replaced. All other components // will be ignored. -URL_EXPORT bool ReplacePathURL(const char* base, - const url_parse::Parsed& base_parsed, - const Replacements<char>& replacements, - CanonOutput* output, - url_parse::Parsed* new_parsed); -URL_EXPORT bool ReplacePathURL(const char* base, - const url_parse::Parsed& base_parsed, - const Replacements<char16>& replacements, - CanonOutput* output, - url_parse::Parsed* new_parsed); +bool ReplacePathURL(const char* base, + const url_parse::Parsed& base_parsed, + const Replacements<char>& replacements, + CanonOutput* output, + url_parse::Parsed* new_parsed); +bool ReplacePathURL(const char* base, + const url_parse::Parsed& base_parsed, + const Replacements<char16>& replacements, + CanonOutput* output, + url_parse::Parsed* new_parsed); // Mailto URLs can only have the scheme, path, and query replaced. // All other components will be ignored. -URL_EXPORT bool ReplaceMailtoURL(const char* base, - const url_parse::Parsed& base_parsed, - const Replacements<char>& replacements, - CanonOutput* output, - url_parse::Parsed* new_parsed); -URL_EXPORT bool ReplaceMailtoURL(const char* base, - const url_parse::Parsed& base_parsed, - const Replacements<char16>& replacements, - CanonOutput* output, - url_parse::Parsed* new_parsed); +bool ReplaceMailtoURL(const char* base, + const url_parse::Parsed& base_parsed, + const Replacements<char>& replacements, + CanonOutput* output, + url_parse::Parsed* new_parsed); +bool ReplaceMailtoURL(const char* base, + const url_parse::Parsed& base_parsed, + const Replacements<char16>& replacements, + CanonOutput* output, + url_parse::Parsed* new_parsed); // Relative URL --------------------------------------------------------------- @@ -835,20 +832,20 @@ URL_EXPORT bool ReplaceMailtoURL(const char* base, // not). Failure means that the combination of URLs doesn't make any sense. // // The base URL should always be canonical, therefore is ASCII. -URL_EXPORT bool IsRelativeURL(const char* base, - const url_parse::Parsed& base_parsed, - const char* fragment, - int fragment_len, - bool is_base_hierarchical, - bool* is_relative, - url_parse::Component* relative_component); -URL_EXPORT bool IsRelativeURL(const char* base, - const url_parse::Parsed& base_parsed, - const char16* fragment, - int fragment_len, - bool is_base_hierarchical, - bool* is_relative, - url_parse::Component* relative_component); +bool IsRelativeURL(const char* base, + const url_parse::Parsed& base_parsed, + const char* fragment, + int fragment_len, + bool is_base_hierarchical, + bool* is_relative, + url_parse::Component* relative_component); +bool IsRelativeURL(const char* base, + const url_parse::Parsed& base_parsed, + const char16* fragment, + int fragment_len, + bool is_base_hierarchical, + bool* is_relative, + url_parse::Component* relative_component); // Given a canonical parsed source URL, a URL fragment known to be relative, // and the identified relevant portion of the relative URL (computed by @@ -868,24 +865,22 @@ URL_EXPORT bool IsRelativeURL(const char* base, // Returns true on success. On failure, the output will be "something // reasonable" that will be consistent and valid, just probably not what // was intended by the web page author or caller. -URL_EXPORT bool ResolveRelativeURL( - const char* base_url, - const url_parse::Parsed& base_parsed, - bool base_is_file, - const char* relative_url, - const url_parse::Component& relative_component, - CharsetConverter* query_converter, - CanonOutput* output, - url_parse::Parsed* out_parsed); -URL_EXPORT bool ResolveRelativeURL( - const char* base_url, - const url_parse::Parsed& base_parsed, - bool base_is_file, - const char16* relative_url, - const url_parse::Component& relative_component, - CharsetConverter* query_converter, - CanonOutput* output, - url_parse::Parsed* out_parsed); +bool ResolveRelativeURL(const char* base_url, + const url_parse::Parsed& base_parsed, + bool base_is_file, + const char* relative_url, + const url_parse::Component& relative_component, + CharsetConverter* query_converter, + CanonOutput* output, + url_parse::Parsed* out_parsed); +bool ResolveRelativeURL(const char* base_url, + const url_parse::Parsed& base_parsed, + bool base_is_file, + const char16* relative_url, + const url_parse::Component& relative_component, + CharsetConverter* query_converter, + CanonOutput* output, + url_parse::Parsed* out_parsed); } // namespace url_canon diff --git a/url/url_canon_icu.h b/url/url_canon_icu.h index 1f9f092..d8eacbf 100644 --- a/url/url_canon_icu.h +++ b/url/url_canon_icu.h @@ -8,7 +8,6 @@ // ICU integration functions. #include "url/url_canon.h" -#include "url/url_export.h" typedef struct UConverter UConverter; @@ -16,7 +15,7 @@ namespace url_canon { // An implementation of CharsetConverter that implementations can use to // interface the canonicalizer with ICU's conversion routines. -class URL_EXPORT ICUCharsetConverter : public CharsetConverter { +class ICUCharsetConverter : public CharsetConverter { public: // Constructs a converter using an already-existing ICU character set // converter. This converter is NOT owned by this object; the lifetime must diff --git a/url/url_canon_internal.h b/url/url_canon_internal.h index 23adc9e..265bdfd 100644 --- a/url/url_canon_internal.h +++ b/url/url_canon_internal.h @@ -83,7 +83,7 @@ void AppendStringOfType(const char16* source, int length, // Maps the hex numerical values 0x0 to 0xf to the corresponding ASCII digit // that will be used to represent it. -URL_EXPORT extern const char kHexCharLookup[0x10]; +extern const char kHexCharLookup[0x10]; // This lookup table allows fast conversion between ASCII hex letters and their // corresponding numerical value. The 8-bit range is divided up into 8 @@ -150,8 +150,8 @@ extern const char16 kUnicodeReplacementCharacter; // (for a single-byte ASCII character, it will not be changed). // // Implementation is in url_canon_icu.cc. -URL_EXPORT bool ReadUTFChar(const char* str, int* begin, int length, - unsigned* code_point_out); +bool ReadUTFChar(const char* str, int* begin, int length, + unsigned* code_point_out); // Generic To-UTF-8 converter. This will call the given append method for each // character that should be appended, with the given output method. Wrappers @@ -227,8 +227,8 @@ inline void AppendUTF8EscapedValue(unsigned char_value, CanonOutput* output) { // (for a single-16-bit-word character, it will not be changed). // // Implementation is in url_canon_icu.cc. -URL_EXPORT bool ReadUTFChar(const char16* str, int* begin, int length, - unsigned* code_point); +bool ReadUTFChar(const char16* str, int* begin, int length, + unsigned* code_point); // Equivalent to U16_APPEND_UNSAFE in ICU but uses our output method. inline void AppendUTF16Value(unsigned code_point, @@ -346,10 +346,10 @@ void AppendInvalidNarrowString(const char16* spec, int begin, int end, // replacing the invalid characters with the "invalid character". It will // return false in the failure case, and the caller should not continue as // normal. -URL_EXPORT bool ConvertUTF16ToUTF8(const char16* input, int input_len, - CanonOutput* output); -URL_EXPORT bool ConvertUTF8ToUTF16(const char* input, int input_len, - CanonOutputT<char16>* output); +bool ConvertUTF16ToUTF8(const char16* input, int input_len, + CanonOutput* output); +bool ConvertUTF8ToUTF16(const char* input, int input_len, + CanonOutputT<char16>* output); // Converts from UTF-16 to 8-bit using the character set converter. If the // converter is NULL, this will use UTF-8. @@ -408,10 +408,9 @@ bool CanonicalizePartialPath(const char16* spec, #ifndef WIN32 // Implementations of Windows' int-to-string conversions -URL_EXPORT int _itoa_s(int value, char* buffer, size_t size_in_chars, - int radix); -URL_EXPORT int _itow_s(int value, char16* buffer, size_t size_in_chars, - int radix); +int _itoa_s(int value, char* buffer, size_t size_in_chars, int radix); +int _itow_s(int value, char16* buffer, size_t size_in_chars, + int radix); // Secure template overloads for these functions template<size_t N> diff --git a/url/url_canon_ip.h b/url/url_canon_ip.h index fd288ad..bf4b4ad 100644 --- a/url/url_canon_ip.h +++ b/url/url_canon_ip.h @@ -7,18 +7,17 @@ #include "base/string16.h" #include "url/url_canon.h" -#include "url/url_export.h" #include "url/url_parse.h" namespace url_canon { // Writes the given IPv4 address to |output|. -URL_EXPORT void AppendIPv4Address(const unsigned char address[4], - CanonOutput* output); +void AppendIPv4Address(const unsigned char address[4], + CanonOutput* output); // Writes the given IPv6 address to |output|. -URL_EXPORT void AppendIPv6Address(const unsigned char address[16], - CanonOutput* output); +void AppendIPv6Address(const unsigned char address[16], + CanonOutput* output); // Searches the host name for the portions of the IPv4 address. On success, // each component will be placed into |components| and it will return true. @@ -38,12 +37,12 @@ URL_EXPORT void AppendIPv6Address(const unsigned char address[16], // Mozilla), so this code path never gets hit. Our host canonicalization will // notice these spaces and escape them, which will make IP address finding // fail. This seems like better behavior than stripping after a space. -URL_EXPORT bool FindIPv4Components(const char* spec, - const url_parse::Component& host, - url_parse::Component components[4]); -URL_EXPORT bool FindIPv4Components(const char16* spec, - const url_parse::Component& host, - url_parse::Component components[4]); +bool FindIPv4Components(const char* spec, + const url_parse::Component& host, + url_parse::Component components[4]); +bool FindIPv4Components(const char16* spec, + const url_parse::Component& host, + url_parse::Component components[4]); // Converts an IPv4 address to a 32-bit number (network byte order). // @@ -56,12 +55,12 @@ URL_EXPORT bool FindIPv4Components(const char16* spec, // // On success, |num_ipv4_components| will be populated with the number of // components in the IPv4 address. -URL_EXPORT CanonHostInfo::Family IPv4AddressToNumber( +CanonHostInfo::Family IPv4AddressToNumber( const char* spec, const url_parse::Component& host, unsigned char address[4], int* num_ipv4_components); -URL_EXPORT CanonHostInfo::Family IPv4AddressToNumber( +CanonHostInfo::Family IPv4AddressToNumber( const char16* spec, const url_parse::Component& host, unsigned char address[4], @@ -72,12 +71,12 @@ URL_EXPORT CanonHostInfo::Family IPv4AddressToNumber( // // NOTE that |host| is expected to be surrounded by square brackets. // i.e. "[::1]" rather than "::1". -URL_EXPORT bool IPv6AddressToNumber(const char* spec, - const url_parse::Component& host, - unsigned char address[16]); -URL_EXPORT bool IPv6AddressToNumber(const char16* spec, - const url_parse::Component& host, - unsigned char address[16]); +bool IPv6AddressToNumber(const char* spec, + const url_parse::Component& host, + unsigned char address[16]); +bool IPv6AddressToNumber(const char16* spec, + const url_parse::Component& host, + unsigned char address[16]); } // namespace url_canon diff --git a/url/url_export.h b/url/url_export.h deleted file mode 100644 index 15ef19e..0000000 --- a/url/url_export.h +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef URL_URL_EXPORT_H_ -#define URL_URL_EXPORT_H_ - -#if defined(COMPONENT_BUILD) -#if defined(WIN32) - -#if defined(URL_IMPLEMENTATION) -#define URL_EXPORT __declspec(dllexport) -#else -#define URL_EXPORT __declspec(dllimport) -#endif // defined(URL_IMPLEMENTATION) - -#else // !defined(WIN32) - -#if defined(URL_IMPLEMENTATION) -#define URL_EXPORT __attribute__((visibility("default"))) -#else -#define URL_EXPORT -#endif // defined(URL_IMPLEMENTATION) - -#endif // defined(WIN32) - -#else // !defined(COMPONENT_BUILD) - -#define URL_EXPORT - -#endif // define(COMPONENT_BUILD) - -#endif // URL_URL_EXPORT_H_ diff --git a/url/url_parse.h b/url/url_parse.h index 2170904..5c3643f 100644 --- a/url/url_parse.h +++ b/url/url_parse.h @@ -9,7 +9,6 @@ #include "base/basictypes.h" #include "base/string16.h" -#include "url/url_export.h" namespace url_parse { @@ -81,7 +80,7 @@ inline Component MakeRange(int begin, int end) { // else // url_parse::ParsePathURL(url, url_len, &parsed); // -struct URL_EXPORT Parsed { +struct Parsed { // Identifies different components. enum ComponentType { SCHEME, @@ -135,7 +134,8 @@ struct URL_EXPORT Parsed { // *QUERY: 14 15 <- // *REF: 20 20 // - int CountCharactersBefore(ComponentType type, bool include_delimiter) const; + int CountCharactersBefore(ComponentType type, + bool include_delimiter) const; // Scheme without the colon: "http://foo"/ would have a scheme of "http". // The length will be -1 if no scheme is specified ("foo.com"), or 0 if there @@ -220,36 +220,32 @@ struct URL_EXPORT Parsed { // StandardURL is for when the scheme is known to be one that has an // authority (host) like "http". This function will not handle weird ones // like "about:" and "javascript:", or do the right thing for "file:" URLs. -URL_EXPORT void ParseStandardURL(const char* url, - int url_len, - Parsed* parsed); -URL_EXPORT void ParseStandardURL(const char16* url, - int url_len, - Parsed* parsed); +void ParseStandardURL(const char* url, int url_len, Parsed* parsed); +void ParseStandardURL(const char16* url, int url_len, Parsed* parsed); // PathURL is for when the scheme is known not to have an authority (host) // section but that aren't file URLs either. The scheme is parsed, and // everything after the scheme is considered as the path. This is used for // things like "about:" and "javascript:" -URL_EXPORT void ParsePathURL(const char* url, int url_len, Parsed* parsed); -URL_EXPORT void ParsePathURL(const char16* url, int url_len, Parsed* parsed); +void ParsePathURL(const char* url, int url_len, Parsed* parsed); +void ParsePathURL(const char16* url, int url_len, Parsed* parsed); // FileURL is for file URLs. There are some special rules for interpreting // these. -URL_EXPORT void ParseFileURL(const char* url, int url_len, Parsed* parsed); -URL_EXPORT void ParseFileURL(const char16* url, int url_len, Parsed* parsed); +void ParseFileURL(const char* url, int url_len, Parsed* parsed); +void ParseFileURL(const char16* url, int url_len, Parsed* parsed); // Filesystem URLs are structured differently than other URLs. -URL_EXPORT void ParseFileSystemURL(const char* url, - int url_len, - Parsed* parsed); -URL_EXPORT void ParseFileSystemURL(const char16* url, - int url_len, - Parsed* parsed); +void ParseFileSystemURL(const char* url, + int url_len, + Parsed* parsed); +void ParseFileSystemURL(const char16* url, + int url_len, + Parsed* parsed); // MailtoURL is for mailto: urls. They are made up scheme,path,query -URL_EXPORT void ParseMailtoURL(const char* url, int url_len, Parsed* parsed); -URL_EXPORT void ParseMailtoURL(const char16* url, int url_len, Parsed* parsed); +void ParseMailtoURL(const char* url, int url_len, Parsed* parsed); +void ParseMailtoURL(const char16* url, int url_len, Parsed* parsed); // Helper functions ----------------------------------------------------------- @@ -273,31 +269,27 @@ URL_EXPORT void ParseMailtoURL(const char16* url, int url_len, Parsed* parsed); // end of the string). // // The 8-bit version requires UTF-8 encoding. -URL_EXPORT bool ExtractScheme(const char* url, - int url_len, - Component* scheme); -URL_EXPORT bool ExtractScheme(const char16* url, - int url_len, - Component* scheme); +bool ExtractScheme(const char* url, int url_len, Component* scheme); +bool ExtractScheme(const char16* url, int url_len, Component* scheme); // Returns true if ch is a character that terminates the authority segment // of a URL. -URL_EXPORT bool IsAuthorityTerminator(char16 ch); +bool IsAuthorityTerminator(char16 ch); // Does a best effort parse of input |spec|, in range |auth|. If a particular // component is not found, it will be set to invalid. -URL_EXPORT void ParseAuthority(const char* spec, - const Component& auth, - Component* username, - Component* password, - Component* hostname, - Component* port_num); -URL_EXPORT void ParseAuthority(const char16* spec, - const Component& auth, - Component* username, - Component* password, - Component* hostname, - Component* port_num); +void ParseAuthority(const char* spec, + const Component& auth, + Component* username, + Component* password, + Component* hostname, + Component* port_num); +void ParseAuthority(const char16* spec, + const Component& auth, + Component* username, + Component* password, + Component* hostname, + Component* port_num); // Computes the integer port value from the given port component. The port // component should have been identified by one of the init functions on @@ -306,8 +298,8 @@ URL_EXPORT void ParseAuthority(const char16* spec, // The return value will be a positive integer between 0 and 64K, or one of // the two special values below. enum SpecialPort { PORT_UNSPECIFIED = -1, PORT_INVALID = -2 }; -URL_EXPORT int ParsePort(const char* url, const Component& port); -URL_EXPORT int ParsePort(const char16* url, const Component& port); +int ParsePort(const char* url, const Component& port); +int ParsePort(const char16* url, const Component& port); // Extracts the range of the file name in the given url. The path must // already have been computed by the parse function, and the matching URL @@ -319,12 +311,12 @@ URL_EXPORT int ParsePort(const char16* url, const Component& port); // following the last slash. // // The 8-bit version requires UTF-8 encoding. -URL_EXPORT void ExtractFileName(const char* url, - const Component& path, - Component* file_name); -URL_EXPORT void ExtractFileName(const char16* url, - const Component& path, - Component* file_name); +void ExtractFileName(const char* url, + const Component& path, + Component* file_name); +void ExtractFileName(const char16* url, + const Component& path, + Component* file_name); // Extract the first key/value from the range defined by |*query|. Updates // |*query| to start at the end of the extracted key/value pair. This is @@ -341,14 +333,14 @@ URL_EXPORT void ExtractFileName(const char16* url, // // If no key/value are found |*key| and |*value| will be unchanged and it will // return false. -URL_EXPORT bool ExtractQueryKeyValue(const char* url, - Component* query, - Component* key, - Component* value); -URL_EXPORT bool ExtractQueryKeyValue(const char16* url, - Component* query, - Component* key, - Component* value); +bool ExtractQueryKeyValue(const char* url, + Component* query, + Component* key, + Component* value); +bool ExtractQueryKeyValue(const char16* url, + Component* query, + Component* key, + Component* value); } // namespace url_parse diff --git a/url/url_util.h b/url/url_util.h index a5f5176..419775c 100644 --- a/url/url_util.h +++ b/url/url_util.h @@ -9,7 +9,6 @@ #include "base/string16.h" #include "url/url_canon.h" -#include "url/url_export.h" #include "url/url_parse.h" namespace url_util { @@ -27,13 +26,13 @@ namespace url_util { // "noop", unless Shutdown() was called in the mean time. This will also be a // "noop" if other calls to the library have forced an initialization // beforehand. -URL_EXPORT void Initialize(); +void Initialize(); // Cleanup is not required, except some strings may leak. For most user // applications, this is fine. If you're using it in a library that may get // loaded and unloaded, you'll want to unload to properly clean up your // library. -URL_EXPORT void Shutdown(); +void Shutdown(); // Schemes -------------------------------------------------------------------- @@ -41,7 +40,7 @@ URL_EXPORT void Shutdown(); // schemes. This function is not threadsafe and can not be called concurrently // with any other url_util function. It will assert if the list of standard // schemes has been locked (see LockStandardSchemes). -URL_EXPORT void AddStandardScheme(const char* new_scheme); +void AddStandardScheme(const char* new_scheme); // Sets a flag to prevent future calls to AddStandardScheme from succeeding. // @@ -55,7 +54,7 @@ URL_EXPORT void AddStandardScheme(const char* new_scheme); // We could have had AddStandardScheme use a lock instead, but that would add // some platform-specific dependencies we don't otherwise have now, and is // overkill considering the normal usage is so simple. -URL_EXPORT void LockStandardSchemes(); +void LockStandardSchemes(); // Locates the scheme in the given string and places it into |found_scheme|, // which may be NULL to indicate the caller does not care about the range. @@ -63,14 +62,14 @@ URL_EXPORT void LockStandardSchemes(); // Returns whether the given |compare| scheme matches the scheme found in the // input (if any). The |compare| scheme must be a valid canonical scheme or // the result of the comparison is undefined. -URL_EXPORT bool FindAndCompareScheme(const char* str, - int str_len, - const char* compare, - url_parse::Component* found_scheme); -URL_EXPORT bool FindAndCompareScheme(const char16* str, - int str_len, - const char* compare, - url_parse::Component* found_scheme); +bool FindAndCompareScheme(const char* str, + int str_len, + const char* compare, + url_parse::Component* found_scheme); +bool FindAndCompareScheme(const char16* str, + int str_len, + const char* compare, + url_parse::Component* found_scheme); inline bool FindAndCompareScheme(const std::string& str, const char* compare, url_parse::Component* found_scheme) { @@ -86,10 +85,10 @@ inline bool FindAndCompareScheme(const string16& str, // Returns true if the given string represents a standard URL. This means that // either the scheme is in the list of known standard schemes. -URL_EXPORT bool IsStandard(const char* spec, - const url_parse::Component& scheme); -URL_EXPORT bool IsStandard(const char16* spec, - const url_parse::Component& scheme); +bool IsStandard(const char* spec, + const url_parse::Component& scheme); +bool IsStandard(const char16* spec, + const url_parse::Component& scheme); // TODO(brettw) remove this. This is a temporary compatibility hack to avoid // breaking the WebKit build when this version is synced via Chrome. @@ -110,16 +109,16 @@ inline bool IsStandard(const char* spec, int spec_len, // Returns true if a valid URL was produced, false if not. On failure, the // output and parsed structures will still be filled and will be consistent, // but they will not represent a loadable URL. -URL_EXPORT bool Canonicalize(const char* spec, - int spec_len, - url_canon::CharsetConverter* charset_converter, - url_canon::CanonOutput* output, - url_parse::Parsed* output_parsed); -URL_EXPORT bool Canonicalize(const char16* spec, - int spec_len, - url_canon::CharsetConverter* charset_converter, - url_canon::CanonOutput* output, - url_parse::Parsed* output_parsed); +bool Canonicalize(const char* spec, + int spec_len, + url_canon::CharsetConverter* charset_converter, + url_canon::CanonOutput* output, + url_parse::Parsed* output_parsed); +bool Canonicalize(const char16* spec, + int spec_len, + url_canon::CharsetConverter* charset_converter, + url_canon::CanonOutput* output, + url_parse::Parsed* output_parsed); // Resolves a potentially relative URL relative to the given parsed base URL. // The base MUST be valid. The resulting canonical URL and parsed information @@ -131,28 +130,28 @@ URL_EXPORT bool Canonicalize(const char16* spec, // // Returns true if the output is valid, false if the input could not produce // a valid URL. -URL_EXPORT bool ResolveRelative(const char* base_spec, - int base_spec_len, - const url_parse::Parsed& base_parsed, - const char* relative, - int relative_length, - url_canon::CharsetConverter* charset_converter, - url_canon::CanonOutput* output, - url_parse::Parsed* output_parsed); -URL_EXPORT bool ResolveRelative(const char* base_spec, - int base_spec_len, - const url_parse::Parsed& base_parsed, - const char16* relative, - int relative_length, - url_canon::CharsetConverter* charset_converter, - url_canon::CanonOutput* output, - url_parse::Parsed* output_parsed); +bool ResolveRelative(const char* base_spec, + int base_spec_len, + const url_parse::Parsed& base_parsed, + const char* relative, + int relative_length, + url_canon::CharsetConverter* charset_converter, + url_canon::CanonOutput* output, + url_parse::Parsed* output_parsed); +bool ResolveRelative(const char* base_spec, + int base_spec_len, + const url_parse::Parsed& base_parsed, + const char16* relative, + int relative_length, + url_canon::CharsetConverter* charset_converter, + url_canon::CanonOutput* output, + url_parse::Parsed* output_parsed); // Replaces components in the given VALID input url. The new canonical URL info // is written to output and out_parsed. // // Returns true if the resulting URL is valid. -URL_EXPORT bool ReplaceComponents( +bool ReplaceComponents( const char* spec, int spec_len, const url_parse::Parsed& parsed, @@ -160,7 +159,7 @@ URL_EXPORT bool ReplaceComponents( url_canon::CharsetConverter* charset_converter, url_canon::CanonOutput* output, url_parse::Parsed* out_parsed); -URL_EXPORT bool ReplaceComponents( +bool ReplaceComponents( const char* spec, int spec_len, const url_parse::Parsed& parsed, @@ -177,25 +176,25 @@ URL_EXPORT bool ReplaceComponents( // // The versions of this function that don't take a b_end assume that the b // string is NULL terminated. -URL_EXPORT bool LowerCaseEqualsASCII(const char* a_begin, - const char* a_end, - const char* b); -URL_EXPORT bool LowerCaseEqualsASCII(const char* a_begin, - const char* a_end, - const char* b_begin, - const char* b_end); -URL_EXPORT bool LowerCaseEqualsASCII(const char16* a_begin, - const char16* a_end, - const char* b); +bool LowerCaseEqualsASCII(const char* a_begin, + const char* a_end, + const char* b); +bool LowerCaseEqualsASCII(const char* a_begin, + const char* a_end, + const char* b_begin, + const char* b_end); +bool LowerCaseEqualsASCII(const char16* a_begin, + const char16* a_end, + const char* b); // Unescapes the given string using URL escaping rules. -URL_EXPORT void DecodeURLEscapeSequences(const char* input, int length, - url_canon::CanonOutputW* output); +void DecodeURLEscapeSequences(const char* input, int length, + url_canon::CanonOutputW* output); // Escapes the given string as defined by the JS method encodeURIComponent. See // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/encodeURIComponent -URL_EXPORT void EncodeURIComponent(const char* input, int length, - url_canon::CanonOutput* output); +void EncodeURIComponent(const char* input, int length, + url_canon::CanonOutput* output); } // namespace url_util |