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

Unified Diff: media/audio/audio_input_controller.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/audio_input_controller.h ('k') | media/audio/audio_input_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_input_controller.cc
diff --git a/media/audio/audio_input_controller.cc b/media/audio/audio_input_controller.cc
index 8ab709db2cf02f87aed7120e259a84ba61187bb2..4a05d41fab6e7fe7fe186f4d36a6040aa1cb8a6a 100644
--- a/media/audio/audio_input_controller.cc
+++ b/media/audio/audio_input_controller.cc
@@ -515,7 +515,7 @@ void AudioInputController::OnData(AudioInputStream* stream,
// to avoid copying data and posting on the audio thread, we just check for
// non-null here.
if (input_writer_) {
- scoped_ptr<AudioBus> source_copy =
+ std::unique_ptr<AudioBus> source_copy =
AudioBus::Create(source->channels(), source->frames());
source->CopyTo(source_copy.get());
task_runner_->PostTask(
@@ -582,7 +582,7 @@ void AudioInputController::OnData(AudioInputStream* stream,
// TODO(henrika): Investigate if we can avoid the extra copy here.
// (see http://crbug.com/249316 for details). AFAIK, this scope is only
// active for WebSpeech clients.
- scoped_ptr<AudioBus> audio_data =
+ std::unique_ptr<AudioBus> audio_data =
AudioBus::Create(source->channels(), source->frames());
source->CopyTo(audio_data.get());
@@ -594,7 +594,7 @@ void AudioInputController::OnData(AudioInputStream* stream,
&AudioInputController::DoOnData, this, base::Passed(&audio_data)));
}
-void AudioInputController::DoOnData(scoped_ptr<AudioBus> data) {
+void AudioInputController::DoOnData(std::unique_ptr<AudioBus> data) {
DCHECK(task_runner_->BelongsToCurrentThread());
if (handler_)
handler_->OnData(this, data.get());
@@ -729,7 +729,7 @@ void AudioInputController::DoDisableDebugRecording() {
}
void AudioInputController::WriteInputDataForDebugging(
- scoped_ptr<AudioBus> data) {
+ std::unique_ptr<AudioBus> data) {
DCHECK(task_runner_->BelongsToCurrentThread());
if (input_writer_)
input_writer_->Write(std::move(data));
« no previous file with comments | « media/audio/audio_input_controller.h ('k') | media/audio/audio_input_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698