Commit 6ae11ad7 authored by Daniel Cheng's avatar Daniel Cheng Committed by Commit Bot

Out-of-line url::Origin copy and move constructor/assignment operators.

Saves a few kilobytes on an official build.

Change-Id: Iee0abb341216bcb7c7f5cad214b162567aeb0676
Reviewed-on: https://chromium-review.googlesource.com/720461Reviewed-by: default avatarMike West <mkwst@google.com>
Reviewed-by: default avatarBrett Wilson <brettw@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509513}
parent d5355800
......@@ -80,6 +80,11 @@ Origin::Origin(const GURL& url) : unique_(true), suborigin_(std::string()) {
unique_ = tuple_.IsInvalid();
}
Origin::Origin(const Origin&) = default;
Origin& Origin::operator=(const Origin&) = default;
Origin::Origin(Origin&&) = default;
Origin& Origin::operator=(Origin&&) = default;
Origin::Origin(base::StringPiece scheme,
base::StringPiece host,
uint16_t port,
......
......@@ -90,10 +90,10 @@ class URL_EXPORT Origin {
explicit Origin(const GURL& url);
// Copyable and movable.
Origin(const Origin&) = default;
Origin& operator=(const Origin&) = default;
Origin(Origin&&) = default;
Origin& operator=(Origin&&) = default;
Origin(const Origin&);
Origin& operator=(const Origin&);
Origin(Origin&&);
Origin& operator=(Origin&&);
// Creates an Origin from a |scheme|, |host|, |port| and |suborigin|. All the
// parameters must be valid and canonicalized. Do not use this method to
......
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