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

Unified Diff: url/gurl.h

Issue 2956643002: Add GURL::HostNoBracketsPiece() (Closed)
Patch Set: Simplify test Created 3 years, 6 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
« no previous file with comments | « net/url_request/url_request_http_job.cc ('k') | url/gurl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/gurl.h
diff --git a/url/gurl.h b/url/gurl.h
index 74efbb5021e67515fa14738bd315a6338d344daf..6f4536d95c81129205c2a5aa4ccd1edb9e094f9c 100644
--- a/url/gurl.h
+++ b/url/gurl.h
@@ -380,6 +380,9 @@ class URL_EXPORT GURL {
// literals. This can be useful for passing to getaddrinfo().
std::string HostNoBrackets() const;
+ // Returns the same characters as HostNoBrackets(), avoiding a copy.
+ base::StringPiece HostNoBracketsPiece() const;
+
// Returns true if this URL's host matches or is in the same domain as
// the given input string. For example, if the hostname of the URL is
// "www.google.com", this will return true for "com", "google.com", and
« no previous file with comments | « net/url_request/url_request_http_job.cc ('k') | url/gurl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698