Index: content/browser/speech/chunked_byte_buffer.cc |
diff --git a/content/browser/speech/chunked_byte_buffer.cc b/content/browser/speech/chunked_byte_buffer.cc |
index a43e40a420cf3721afdcc4bafb67bb7786919ede..3edd0ea4ecc3e367ac173144069eadd044df2bd9 100644 |
--- a/content/browser/speech/chunked_byte_buffer.cc |
+++ b/content/browser/speech/chunked_byte_buffer.cc |
@@ -78,7 +78,7 @@ void ChunkedByteBuffer::Append(const uint8_t* start, size_t length) { |
DCHECK_EQ(partial_chunk_->header.size(), kHeaderLength); |
if (partial_chunk_->ExpectedContentLength() == 0) { |
// Handle zero-byte chunks. |
- chunks_.push_back(partial_chunk_.release()); |
+ chunks_.push_back(std::move(partial_chunk_)); |
partial_chunk_.reset(new Chunk()); |
} else { |
partial_chunk_->content->reserve( |
@@ -87,7 +87,7 @@ void ChunkedByteBuffer::Append(const uint8_t* start, size_t length) { |
} else if (content_completed) { |
DCHECK_EQ(partial_chunk_->content->size(), |
partial_chunk_->ExpectedContentLength()); |
- chunks_.push_back(partial_chunk_.release()); |
+ chunks_.push_back(std::move(partial_chunk_)); |
partial_chunk_.reset(new Chunk()); |
} |
} |
@@ -106,8 +106,8 @@ bool ChunkedByteBuffer::HasChunks() const { |
std::unique_ptr<std::vector<uint8_t>> ChunkedByteBuffer::PopChunk() { |
if (chunks_.empty()) |
return std::unique_ptr<std::vector<uint8_t>>(); |
- std::unique_ptr<Chunk> chunk(*chunks_.begin()); |
- chunks_.weak_erase(chunks_.begin()); |
+ std::unique_ptr<Chunk> chunk = std::move(*chunks_.begin()); |
+ chunks_.erase(chunks_.begin()); |
DCHECK_EQ(chunk->header.size(), kHeaderLength); |
DCHECK_EQ(chunk->content->size(), chunk->ExpectedContentLength()); |
total_bytes_stored_ -= chunk->content->size(); |