Index: media/audio/simple_sources.cc |
diff --git a/media/audio/simple_sources.cc b/media/audio/simple_sources.cc |
index 6aee89fabefafcac2037de9febb4c82254e507f1..a35dd177ab1761c10e6af063507499aa158b0a4e 100644 |
--- a/media/audio/simple_sources.cc |
+++ b/media/audio/simple_sources.cc |
@@ -23,8 +23,8 @@ namespace { |
// return a null pointer if we can't read the file or if it's malformed. The |
// caller takes ownership of the returned data. The size of the data is stored |
// in |read_length|. |
-scoped_ptr<char[]> ReadWavFile(const base::FilePath& wav_filename, |
- size_t* read_length) { |
+std::unique_ptr<char[]> ReadWavFile(const base::FilePath& wav_filename, |
+ size_t* read_length) { |
base::File wav_file( |
wav_filename, base::File::FLAG_OPEN | base::File::FLAG_READ); |
if (!wav_file.IsValid()) { |
@@ -40,7 +40,7 @@ scoped_ptr<char[]> ReadWavFile(const base::FilePath& wav_filename, |
return nullptr; |
} |
- scoped_ptr<char[]> data(new char[wav_file_length]); |
+ std::unique_ptr<char[]> data(new char[wav_file_length]); |
danakj
2016/04/22 22:47:37
include memory
dcheng
2016/04/22 23:13:20
Already in related header.
|
size_t read_bytes = wav_file.Read(0, data.get(), wav_file_length); |
if (read_bytes != wav_file_length) { |
LOG(ERROR) << "Failed to read all bytes of " << wav_filename.value(); |