| Index: net/spdy/spdy_header_block.cc
|
| diff --git a/net/spdy/spdy_header_block.cc b/net/spdy/spdy_header_block.cc
|
| index 61ca9af575137bca631676c803694354ec424219..09640c83ed6fda3f8e51e95e08030c16921bf468 100644
|
| --- a/net/spdy/spdy_header_block.cc
|
| +++ b/net/spdy/spdy_header_block.cc
|
| @@ -120,13 +120,6 @@ SpdyHeaderBlock::StringPieceProxy::operator StringPiece() const {
|
|
|
| SpdyHeaderBlock::SpdyHeaderBlock() : storage_(new Storage) {}
|
|
|
| -SpdyHeaderBlock::SpdyHeaderBlock(const SpdyHeaderBlock& other)
|
| - : storage_(new Storage) {
|
| - for (auto iter : other) {
|
| - AppendHeader(iter.first, iter.second);
|
| - }
|
| -}
|
| -
|
| SpdyHeaderBlock::SpdyHeaderBlock(SpdyHeaderBlock&& other)
|
| : storage_(std::move(other.storage_)) {
|
| // |block_| is linked_hash_map, which does not have move constructor.
|
| @@ -135,14 +128,6 @@ SpdyHeaderBlock::SpdyHeaderBlock(SpdyHeaderBlock&& other)
|
|
|
| SpdyHeaderBlock::~SpdyHeaderBlock() {}
|
|
|
| -SpdyHeaderBlock& SpdyHeaderBlock::operator=(const SpdyHeaderBlock& other) {
|
| - clear();
|
| - for (auto iter : other) {
|
| - AppendHeader(iter.first, iter.second);
|
| - }
|
| - return *this;
|
| -}
|
| -
|
| SpdyHeaderBlock& SpdyHeaderBlock::operator=(SpdyHeaderBlock&& other) {
|
| storage_ = std::move(other.storage_);
|
| // |block_| is linked_hash_map, which does not have move assignment
|
| @@ -151,6 +136,14 @@ SpdyHeaderBlock& SpdyHeaderBlock::operator=(SpdyHeaderBlock&& other) {
|
| return *this;
|
| }
|
|
|
| +SpdyHeaderBlock SpdyHeaderBlock::Clone() const {
|
| + SpdyHeaderBlock copy;
|
| + for (auto iter : *this) {
|
| + copy.AppendHeader(iter.first, iter.second);
|
| + }
|
| + return copy;
|
| +}
|
| +
|
| bool SpdyHeaderBlock::operator==(const SpdyHeaderBlock& other) const {
|
| return size() == other.size() && std::equal(begin(), end(), other.begin());
|
| }
|
|
|