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

Side by Side 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: Spelling mistake in comment fixed Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « url/gurl.cc ('k') | url/third_party/mozilla/url_parse.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef URL_THIRD_PARTY_MOZILLA_URL_PARSE_H_ 5 #ifndef URL_THIRD_PARTY_MOZILLA_URL_PARSE_H_
6 #define URL_THIRD_PARTY_MOZILLA_URL_PARSE_H_ 6 #define URL_THIRD_PARTY_MOZILLA_URL_PARSE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // The password is separated form the username with a colon, as in 152 // The password is separated form the username with a colon, as in
153 // "http://me:secret@host/" 153 // "http://me:secret@host/"
154 Component password; 154 Component password;
155 155
156 // Host name. 156 // Host name.
157 Component host; 157 Component host;
158 158
159 // Port number. 159 // Port number.
160 Component port; 160 Component port;
161 161
162 // Path, this is everything following the host name. Length will be -1 if 162 // Path, this is everything following the host name, stopping at the query of
163 // unspecified. This includes the preceeding slash, so the path on 163 // ref delimiter (if any). Length will be -1 if unspecified. This includes
164 // http://www.google.com/asdf" is "/asdf". As a result, it is impossible to 164 // the preceeding slash, so the path on http://www.google.com/asdf" is
165 // have a 0 length path, it will be -1 in cases like "http://host?foo". 165 // "/asdf". As a result, it is impossible to have a 0 length path, it will
166 // be -1 in cases like "http://host?foo".
166 // Note that we treat backslashes the same as slashes. 167 // Note that we treat backslashes the same as slashes.
167 Component path; 168 Component path;
168 169
169 // Stuff between the ? and the # after the path. This does not include the 170 // Stuff between the ? and the # after the path. This does not include the
170 // preceeding ? character. Length will be -1 if unspecified, 0 if there is 171 // preceeding ? character. Length will be -1 if unspecified, 0 if there is
171 // a question mark but no query string. 172 // a question mark but no query string.
172 Component query; 173 Component query;
173 174
174 // Indicated by a #, this is everything following the hash sign (not 175 // Indicated by a #, this is everything following the hash sign (not
175 // including it). If there are multiple hash signs, we'll use the last one. 176 // including it). If there are multiple hash signs, we'll use the last one.
176 // Length will be -1 if there is no hash sign, or 0 if there is one but 177 // Length will be -1 if there is no hash sign, or 0 if there is one but
177 // nothing follows it. 178 // nothing follows it.
178 Component ref; 179 Component ref;
179 180
181 // The URL spec from the character after the scheme: until the end of the
182 // URL, regardless of the scheme. This is mostly useful for 'opaque' non-
183 // hierarchical schemes like data: and javascript: as a convient way to get
184 // the string with the scheme stripped off.
185 Component GetContent() const;
186
180 // This is used for nested URL types, currently only filesystem. If you 187 // This is used for nested URL types, currently only filesystem. If you
181 // parse a filesystem URL, the resulting Parsed will have a nested 188 // parse a filesystem URL, the resulting Parsed will have a nested
182 // inner_parsed_ to hold the parsed inner URL's component information. 189 // inner_parsed_ to hold the parsed inner URL's component information.
183 // For all other url types [including the inner URL], it will be NULL. 190 // For all other url types [including the inner URL], it will be NULL.
184 Parsed* inner_parsed() const { 191 Parsed* inner_parsed() const {
185 return inner_parsed_; 192 return inner_parsed_;
186 } 193 }
187 194
188 void set_inner_parsed(const Parsed& inner_parsed) { 195 void set_inner_parsed(const Parsed& inner_parsed) {
189 if (!inner_parsed_) 196 if (!inner_parsed_)
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 Component* key, 359 Component* key,
353 Component* value); 360 Component* value);
354 URL_EXPORT bool ExtractQueryKeyValue(const base::char16* url, 361 URL_EXPORT bool ExtractQueryKeyValue(const base::char16* url,
355 Component* query, 362 Component* query,
356 Component* key, 363 Component* key,
357 Component* value); 364 Component* value);
358 365
359 } // namespace url_parse 366 } // namespace url_parse
360 367
361 #endif // URL_THIRD_PARTY_MOZILLA_URL_PARSE_H_ 368 #endif // URL_THIRD_PARTY_MOZILLA_URL_PARSE_H_
OLDNEW
« no previous file with comments | « 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