OLD | NEW |
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_GURL_H_ | 5 #ifndef URL_GURL_H_ |
6 #define URL_GURL_H_ | 6 #define URL_GURL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <iosfwd> | 10 #include <iosfwd> |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 // returned. | 196 // returned. |
197 GURL GetAsReferrer() const; | 197 GURL GetAsReferrer() const; |
198 | 198 |
199 // Returns true if the scheme for the current URL is a known "standard-format" | 199 // Returns true if the scheme for the current URL is a known "standard-format" |
200 // scheme. A standard-format scheme adheres to what RFC 3986 calls "generic | 200 // scheme. A standard-format scheme adheres to what RFC 3986 calls "generic |
201 // URI syntax" (https://tools.ietf.org/html/rfc3986#section-3). This includes | 201 // URI syntax" (https://tools.ietf.org/html/rfc3986#section-3). This includes |
202 // file: and filesystem:, which some callers may want to filter out explicitly | 202 // file: and filesystem:, which some callers may want to filter out explicitly |
203 // by calling SchemeIsFile[System]. | 203 // by calling SchemeIsFile[System]. |
204 bool IsStandard() const; | 204 bool IsStandard() const; |
205 | 205 |
| 206 // Returns true when the url is of the form about:blank, about:blank?foo or |
| 207 // about:blank/#foo. |
| 208 bool IsAboutBlank() const; |
| 209 |
206 // Returns true if the given parameter (should be lower-case ASCII to match | 210 // Returns true if the given parameter (should be lower-case ASCII to match |
207 // the canonicalized scheme) is the scheme for this URL. Do not include a | 211 // the canonicalized scheme) is the scheme for this URL. Do not include a |
208 // colon. | 212 // colon. |
209 bool SchemeIs(base::StringPiece lower_ascii_scheme) const; | 213 bool SchemeIs(base::StringPiece lower_ascii_scheme) const; |
210 | 214 |
211 // Returns true if the scheme is "http" or "https". | 215 // Returns true if the scheme is "http" or "https". |
212 bool SchemeIsHTTPOrHTTPS() const; | 216 bool SchemeIsHTTPOrHTTPS() const; |
213 | 217 |
214 // Returns true if the scheme is valid for use as a referrer. | 218 // Returns true if the scheme is valid for use as a referrer. |
215 bool SchemeIsValidForReferrer() const; | 219 bool SchemeIsValidForReferrer() const; |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 URL_EXPORT bool operator==(const GURL& x, const GURL& y); | 465 URL_EXPORT bool operator==(const GURL& x, const GURL& y); |
462 URL_EXPORT bool operator!=(const GURL& x, const GURL& y); | 466 URL_EXPORT bool operator!=(const GURL& x, const GURL& y); |
463 | 467 |
464 // Equality operator for comparing raw spec_. This should be used in place of | 468 // Equality operator for comparing raw spec_. This should be used in place of |
465 // url == GURL(spec) where |spec| is known (i.e. constants). This is to prevent | 469 // url == GURL(spec) where |spec| is known (i.e. constants). This is to prevent |
466 // needlessly re-parsing |spec| into a temporary GURL. | 470 // needlessly re-parsing |spec| into a temporary GURL. |
467 URL_EXPORT bool operator==(const GURL& x, const base::StringPiece& spec); | 471 URL_EXPORT bool operator==(const GURL& x, const base::StringPiece& spec); |
468 URL_EXPORT bool operator!=(const GURL& x, const base::StringPiece& spec); | 472 URL_EXPORT bool operator!=(const GURL& x, const base::StringPiece& spec); |
469 | 473 |
470 #endif // URL_GURL_H_ | 474 #endif // URL_GURL_H_ |
OLD | NEW |