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

Side by Side Diff: url/gurl.h

Issue 1133943002: Create net::FormatOriginForDisplay helper function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Crucial punctuation in comment. Created 5 years, 7 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
« net/base/net_util_icu.cc ('K') | « net/base/net_util_icu_unittest.cc ('k') | no next file » | 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_GURL_H_ 5 #ifndef URL_GURL_H_
6 #define URL_GURL_H_ 6 #define URL_GURL_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <string> 9 #include <string>
10 10
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // A helper function to return a GURL stripped from the elements that are not 191 // A helper function to return a GURL stripped from the elements that are not
192 // supposed to be sent as HTTP referrer: username, password and ref fragment. 192 // supposed to be sent as HTTP referrer: username, password and ref fragment.
193 // For invalid URLs or URLs that no valid referrers, an empty URL will be 193 // For invalid URLs or URLs that no valid referrers, an empty URL will be
194 // returned. 194 // returned.
195 GURL GetAsReferrer() const; 195 GURL GetAsReferrer() const;
196 196
197 // Returns true if the scheme for the current URL is a known "standard" 197 // Returns true if the scheme for the current URL is a known "standard"
198 // scheme. Standard schemes have an authority and a path section. This 198 // scheme. Standard schemes have an authority and a path section. This
199 // includes file: and filesystem:, which some callers may want to filter out 199 // includes file: and filesystem:, which some callers may want to filter out
200 // explicitly by calling SchemeIsFile[System]. 200 // explicitly by calling SchemeIsFile[System].
201 //
202 // TODO(palmer): Determine whether GURL::IsStandard should return false for
203 // filesystem: URLs.
204 // https://code.google.com/p/chromium/issues/detail?id=487399
201 bool IsStandard() const; 205 bool IsStandard() const;
202 206
203 // Returns true if the given parameter (should be lower-case ASCII to match 207 // Returns true if the given parameter (should be lower-case ASCII to match
204 // the canonicalized scheme) is the scheme for this URL. This call is more 208 // the canonicalized scheme) is the scheme for this URL. This call is more
205 // efficient than getting the scheme and comparing it because no copies or 209 // efficient than getting the scheme and comparing it because no copies or
206 // object constructions are done. 210 // object constructions are done.
207 bool SchemeIs(const char* lower_ascii_scheme) const; 211 bool SchemeIs(const char* lower_ascii_scheme) const;
208 212
209 // Returns true if the scheme is "http" or "https". 213 // Returns true if the scheme is "http" or "https".
210 bool SchemeIsHTTPOrHTTPS() const; 214 bool SchemeIsHTTPOrHTTPS() const;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 // Used for nested schemes [currently only filesystem:]. 421 // Used for nested schemes [currently only filesystem:].
418 scoped_ptr<GURL> inner_url_; 422 scoped_ptr<GURL> inner_url_;
419 423
420 // TODO bug 684583: Add encoding for query params. 424 // TODO bug 684583: Add encoding for query params.
421 }; 425 };
422 426
423 // Stream operator so GURL can be used in assertion statements. 427 // Stream operator so GURL can be used in assertion statements.
424 URL_EXPORT std::ostream& operator<<(std::ostream& out, const GURL& url); 428 URL_EXPORT std::ostream& operator<<(std::ostream& out, const GURL& url);
425 429
426 #endif // URL_GURL_H_ 430 #endif // URL_GURL_H_
OLDNEW
« net/base/net_util_icu.cc ('K') | « net/base/net_util_icu_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698