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

Unified Diff: media/audio/simple_sources.cc

Issue 1911913002: Convert //media/audio from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 | « media/audio/simple_sources.h ('k') | media/audio/simple_sources_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]);
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();
« no previous file with comments | « media/audio/simple_sources.h ('k') | media/audio/simple_sources_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698