Commit f13eb656 authored by Rakina Zata Amni's avatar Rakina Zata Amni Committed by Commit Bot

Use std::move in ResponseBodyLoader::Buffer::AddChunk

To move the newly-created chunk instead of copying it.

Bug: 1148064
Change-Id: Id1f0615f32ae58a010d7616fc347ee7b2ad228cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2537508
Auto-Submit: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarNate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827828}
parent cb51efda
......@@ -288,7 +288,7 @@ class ResponseBodyLoader::Buffer final
void AddChunk(const char* buffer, size_t available) {
Vector<char> new_chunk;
new_chunk.Append(buffer, available);
buffered_data_.emplace_back(new_chunk);
buffered_data_.emplace_back(std::move(new_chunk));
}
// Dispatches the frontmost chunk in |buffered_data_|. Returns the size of
......
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