Commit 7f1c5bab authored by Devlin Cronin's avatar Devlin Cronin Committed by Commit Bot

[Extensions] Add URLPattern move constructor/assignment

Add support for std::move()'ing URLPatterns around.

Bug: 908536

Change-Id: I2e9721a3a0bbd76c068c5346f0eac6b2d3dccf10
Reviewed-on: https://chromium-review.googlesource.com/c/1482134Reviewed-by: default avatarIstiaque Ahmed <lazyboy@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634779}
parent badbc72f
...@@ -176,9 +176,15 @@ URLPattern::URLPattern(int valid_schemes, base::StringPiece pattern) ...@@ -176,9 +176,15 @@ URLPattern::URLPattern(int valid_schemes, base::StringPiece pattern)
URLPattern::URLPattern(const URLPattern& other) = default; URLPattern::URLPattern(const URLPattern& other) = default;
URLPattern::URLPattern(URLPattern&& other) = default;
URLPattern::~URLPattern() { URLPattern::~URLPattern() {
} }
URLPattern& URLPattern::operator=(const URLPattern& other) = default;
URLPattern& URLPattern::operator=(URLPattern&& other) = default;
bool URLPattern::operator<(const URLPattern& other) const { bool URLPattern::operator<(const URLPattern& other) const {
return GetAsString() < other.GetAsString(); return GetAsString() < other.GetAsString();
} }
......
...@@ -108,8 +108,12 @@ class URLPattern { ...@@ -108,8 +108,12 @@ class URLPattern {
URLPattern(); URLPattern();
URLPattern(const URLPattern& other); URLPattern(const URLPattern& other);
URLPattern(URLPattern&& other);
~URLPattern(); ~URLPattern();
URLPattern& operator=(const URLPattern& other);
URLPattern& operator=(URLPattern&& other);
bool operator<(const URLPattern& other) const; bool operator<(const URLPattern& other) const;
bool operator>(const URLPattern& other) const; bool operator>(const URLPattern& other) const;
bool operator==(const URLPattern& other) const; bool operator==(const URLPattern& other) const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment