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

Unified Diff: url/gurl.h

Issue 1568073002: Reduce string copies in GURL creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « third_party/mozilla/mozilla.gyp ('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 b49d2fdb1c618ff20482eaf702949f86a9c112b1..6af2baccea7549f989d11f0ebc8d7d16325deaac 100644
--- a/url/gurl.h
+++ b/url/gurl.h
@@ -56,8 +56,8 @@ class URL_EXPORT GURL {
GURL(const GURL& other);
// The strings to this contructor should be UTF-8 / UTF-16.
- explicit GURL(const std::string& url_string);
- explicit GURL(const base::string16& url_string);
+ explicit GURL(base::StringPiece url_string);
+ explicit GURL(base::StringPiece16 url_string);
// Constructor for URLs that have already been parsed and canonicalized. This
// is used for conversions from KURL, for example. The caller must supply all
@@ -405,7 +405,8 @@ class URL_EXPORT GURL {
GURL(const std::string& url_string, RetainWhiteSpaceSelector);
template<typename STR>
- void InitCanonical(const STR& input_spec, bool trim_path_end);
+ void InitCanonical(base::BasicStringPiece<STR> input_spec,
+ bool trim_path_end);
void InitializeFromCanonicalSpec();
« no previous file with comments | « third_party/mozilla/mozilla.gyp ('k') | url/gurl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698