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

Unified Diff: content/browser/speech/audio_encoder.cc

Issue 1874893002: Convert //content/browser 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 | « content/browser/site_per_process_browsertest.cc ('k') | content/browser/speech/chunked_byte_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/speech/audio_encoder.cc
diff --git a/content/browser/speech/audio_encoder.cc b/content/browser/speech/audio_encoder.cc
index e4473a0ac429ae813e18fb1e0eba14986b0ba52b..c4431cb3f7d04171b9c3ac3d40a6cf6bd64b66bd 100644
--- a/content/browser/speech/audio_encoder.cc
+++ b/content/browser/speech/audio_encoder.cc
@@ -6,8 +6,9 @@
#include <stddef.h>
+#include <memory>
+
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "content/browser/speech/audio_buffer.h"
@@ -62,7 +63,7 @@ void AudioEncoder::Encode(const AudioChunk& raw_audio) {
// FLAC encoder wants samples as int32s.
const int num_samples = raw_audio.NumSamples();
- scoped_ptr<FLAC__int32[]> flac_samples(new FLAC__int32[num_samples]);
+ std::unique_ptr<FLAC__int32[]> flac_samples(new FLAC__int32[num_samples]);
FLAC__int32* flac_samples_ptr = flac_samples.get();
for (int i = 0; i < num_samples; ++i)
flac_samples_ptr[i] = static_cast<FLAC__int32>(raw_audio.GetSample16(i));
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/browser/speech/chunked_byte_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698