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

Unified Diff: url/gurl.h

Issue 2737693003: Add move constructors and assignment operators to GURL (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | 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 ae2c40889f9aa6526307d17cad164c247ad547f1..4cbd84656f989a63ff54ccf50fa3b3aa484c658c 100644
--- a/url/gurl.h
+++ b/url/gurl.h
@@ -54,6 +54,7 @@ class URL_EXPORT GURL {
// Copy construction is relatively inexpensive, with most of the time going
// to reallocating the string. It does not re-parse.
GURL(const GURL& other);
+ GURL(GURL&& other);
// The strings to this contructor should be UTF-8 / UTF-16.
explicit GURL(base::StringPiece url_string);
@@ -76,7 +77,8 @@ class URL_EXPORT GURL {
~GURL();
- GURL& operator=(GURL other);
+ GURL& operator=(const GURL& other);
+ GURL& operator=(GURL&& other);
// Returns true when this object represents a valid parsed URL. When not
// valid, other functions will still succeed, but you will not get canonical
« no previous file with comments | « no previous file | url/gurl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698