From 3ebea920942e11fb0c81c83718699ab4e6a6a370 Mon Sep 17 00:00:00 2001 From: "derat@chromium.org" Date: Thu, 19 Jul 2012 00:38:58 +0000 Subject: 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 --- content/browser/speech/chunked_byte_buffer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '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 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 > ChunkedByteBuffer::PopChunk() { } void ChunkedByteBuffer::Clear() { - chunks_.reset(); + chunks_.clear(); partial_chunk_.reset(new Chunk()); total_bytes_stored_ = 0; } -- cgit v1.1