summaryrefslogtreecommitdiffstats
path: root/url/url_parse.h
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-30 00:45:48 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-30 00:45:48 +0000
commit7394c6dfcd1d490dc4ca753bbab2443ac6517282 (patch)
tree4f585d0cc81df0fe030dab062dc9e742c1f6af4f /url/url_parse.h
parent15b05a7d37381e8487fb7eebf2d90355a8774431 (diff)
downloadchromium_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/url_parse.h')
-rw-r--r--url/url_parse.h104
1 files changed, 48 insertions, 56 deletions
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