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

Unified Diff: components/audio_modem/audio_recorder_impl.cc

Issue 1921973002: Convert //components/[a-e]* 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 | « components/audio_modem/audio_recorder_impl.h ('k') | components/audio_modem/audio_recorder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/audio_modem/audio_recorder_impl.cc
diff --git a/components/audio_modem/audio_recorder_impl.cc b/components/audio_modem/audio_recorder_impl.cc
index 06bc72827fda4426d789da30b71e0745659b5c14..e35c5403e3d53ce77310a2ba73370f44d94190c8 100644
--- a/components/audio_modem/audio_recorder_impl.cc
+++ b/components/audio_modem/audio_recorder_impl.cc
@@ -25,7 +25,8 @@ namespace {
const float kProcessIntervalMs = 500.0f; // milliseconds.
-void AudioBusToString(scoped_ptr<media::AudioBus> source, std::string* buffer) {
+void AudioBusToString(std::unique_ptr<media::AudioBus> source,
+ std::string* buffer) {
buffer->resize(source->frames() * source->channels() * sizeof(float));
float* buffer_view = reinterpret_cast<float*>(string_as_array(buffer));
@@ -40,7 +41,7 @@ void AudioBusToString(scoped_ptr<media::AudioBus> source, std::string* buffer) {
// converts our samples to the required sample rate, interleaves the samples
// and sends them to the whispernet decoder to process.
void ProcessSamples(
- scoped_ptr<media::AudioBus> bus,
+ std::unique_ptr<media::AudioBus> bus,
const AudioRecorderImpl::RecordedSamplesCallback& callback) {
std::string samples;
AudioBusToString(std::move(bus), &samples);
« no previous file with comments | « components/audio_modem/audio_recorder_impl.h ('k') | components/audio_modem/audio_recorder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698