diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-19 00:38:58 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-19 00:38:58 +0000 |
commit | 3ebea920942e11fb0c81c83718699ab4e6a6a370 (patch) | |
tree | bb65049c51fd35a354ab4505802822cb884e3ff5 /content/browser/speech/chunked_byte_buffer.cc | |
parent | e19d265c10c73b01717054f2bc7da1797d937bfd (diff) | |
download | chromium_src-3ebea920942e11fb0c81c83718699ab4e6a6a370.zip chromium_src-3ebea920942e11fb0c81c83718699ab4e6a6a370.tar.gz chromium_src-3ebea920942e11fb0c81c83718699ab4e6a6a370.tar.bz2 |
base: Make ScopedVector::clear() destroy elements.
This makes ScopedVector's clear() method destroy the
elements before clearing the internal vector, matching the
behavior of the erase() method. I'm moving clear()'s
previous element-preserving behavior into a new weak_clear()
method, matching weak_erase().
I'm also removing ScopedVector::reset(), as it duplicated
clear()'s new behavior and isn't a part of std::vector.
BUG=137909
TEST=added
Review URL: https://chromiumcodereview.appspot.com/10797017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147360 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/speech/chunked_byte_buffer.cc')
-rw-r--r-- | content/browser/speech/chunked_byte_buffer.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/content/browser/speech/chunked_byte_buffer.cc b/content/browser/speech/chunked_byte_buffer.cc index 115fa82..07e3c3f 100644 --- a/content/browser/speech/chunked_byte_buffer.cc +++ b/content/browser/speech/chunked_byte_buffer.cc @@ -110,7 +110,7 @@ scoped_ptr< std::vector<uint8> > ChunkedByteBuffer::PopChunk() { } void ChunkedByteBuffer::Clear() { - chunks_.reset(); + chunks_.clear(); partial_chunk_.reset(new Chunk()); total_bytes_stored_ = 0; } |