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

Side by Side Diff: url/gurl.h

Issue 1131813004: Revert of Create net::FormatOriginForDisplay helper function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « 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
205 bool IsStandard() const; 201 bool IsStandard() const;
206 202
207 // Returns true if the given parameter (should be lower-case ASCII to match 203 // Returns true if the given parameter (should be lower-case ASCII to match
208 // the canonicalized scheme) is the scheme for this URL. This call is more 204 // the canonicalized scheme) is the scheme for this URL. This call is more
209 // efficient than getting the scheme and comparing it because no copies or 205 // efficient than getting the scheme and comparing it because no copies or
210 // object constructions are done. 206 // object constructions are done.
211 bool SchemeIs(const char* lower_ascii_scheme) const; 207 bool SchemeIs(const char* lower_ascii_scheme) const;
212 208
213 // Returns true if the scheme is "http" or "https". 209 // Returns true if the scheme is "http" or "https".
214 bool SchemeIsHTTPOrHTTPS() const; 210 bool SchemeIsHTTPOrHTTPS() const;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 // Used for nested schemes [currently only filesystem:]. 417 // Used for nested schemes [currently only filesystem:].
422 scoped_ptr<GURL> inner_url_; 418 scoped_ptr<GURL> inner_url_;
423 419
424 // TODO bug 684583: Add encoding for query params. 420 // TODO bug 684583: Add encoding for query params.
425 }; 421 };
426 422
427 // Stream operator so GURL can be used in assertion statements. 423 // Stream operator so GURL can be used in assertion statements.
428 URL_EXPORT std::ostream& operator<<(std::ostream& out, const GURL& url); 424 URL_EXPORT std::ostream& operator<<(std::ostream& out, const GURL& url);
429 425
430 #endif // URL_GURL_H_ 426 #endif // URL_GURL_H_
OLDNEW
« no previous file with comments | « 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