Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(870)

Unified Diff: media/blink/buffered_data_source.h

Issue 594733004: BufferedDataSource: don't reallocate buffer unnecessarily (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: follow-up Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/blink/buffered_data_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/buffered_data_source.h
diff --git a/media/blink/buffered_data_source.h b/media/blink/buffered_data_source.h
index 5ae7d935c622931f27fff2682aadb30f8e182565..e49494b371d5db465b8a61a1f97a929b95ddfb20 100644
--- a/media/blink/buffered_data_source.h
+++ b/media/blink/buffered_data_source.h
@@ -6,6 +6,7 @@
#define MEDIA_BLINK_BUFFERED_DATA_SOURCE_H_
#include <string>
+#include <vector>
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
@@ -196,8 +197,7 @@ class MEDIA_EXPORT BufferedDataSource : public DataSource {
// because we want buffer to be passed into BufferedResourceLoader to be
// always non-null. And by initializing this member with a default size we can
// avoid creating zero-sized buffered if the first read has zero size.
- scoped_ptr<uint8[]> intermediate_read_buffer_;
- int intermediate_read_buffer_size_;
+ std::vector<uint8> intermediate_read_buffer_;
// The task runner of the render thread.
const scoped_refptr<base::SingleThreadTaskRunner> render_task_runner_;
« no previous file with comments | « no previous file | media/blink/buffered_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698