Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(532)

Unified Diff: url/third_party/mozilla/url_parse.h

Issue 23549039: Preparing to support fragment resolution against non-hierarchical schemes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: url/third_party/mozilla/url_parse.h
diff --git a/url/third_party/mozilla/url_parse.h b/url/third_party/mozilla/url_parse.h
index fd974f8863b079dd0d8abad325aca72a5ceab500..5fa9322512632f88f96b8e8061391c2ba01b0561 100644
--- a/url/third_party/mozilla/url_parse.h
+++ b/url/third_party/mozilla/url_parse.h
@@ -159,10 +159,11 @@ struct URL_EXPORT Parsed {
// Port number.
Component port;
- // Path, this is everything following the host name. Length will be -1 if
- // unspecified. This includes the preceeding slash, so the path on
- // http://www.google.com/asdf" is "/asdf". As a result, it is impossible to
- // have a 0 length path, it will be -1 in cases like "http://host?foo".
+ // Path, this is everything following the host name, stopping at the query of
+ // ref delimiter (if any). Length will be -1 if unspecified. This includes
+ // the preceeding slash, so the path on http://www.google.com/asdf" is
+ // "/asdf". As a result, it is impossible to have a 0 length path, it will
+ // be -1 in cases like "http://host?foo".
// Note that we treat backslashes the same as slashes.
Component path;
@@ -177,6 +178,12 @@ struct URL_EXPORT Parsed {
// nothing follows it.
Component ref;
+ // The URL spec from the character after the scheme: until the end of the
+ // URL, regardless of the scheme. This is mostly useful for 'opaque' non-
+ // hierarchical schemes like data: and javascript: as a convient way to get
+ // the string with the scheme stripped off.
+ Component GetContent() const;
+
// This is used for nested URL types, currently only filesystem. If you
// parse a filesystem URL, the resulting Parsed will have a nested
// inner_parsed_ to hold the parsed inner URL's component information.
« url/gurl.cc ('K') | « url/gurl.cc ('k') | url/third_party/mozilla/url_parse.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698