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

Side by Side Diff: media/audio/fake_audio_input_stream.cc

Issue 2253943004: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | media/audio/fake_audio_log_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/audio/fake_audio_input_stream.h" 5 #include "media/audio/fake_audio_input_stream.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 << switches::kUseFileForFakeAudioCapture 120 << switches::kUseFileForFakeAudioCapture
121 << "."; 121 << ".";
122 base::FilePath path_to_wav_file = base::FilePath(parameters[0]); 122 base::FilePath path_to_wav_file = base::FilePath(parameters[0]);
123 bool looping = true; 123 bool looping = true;
124 if (parameters.size() == 2) { 124 if (parameters.size() == 2) {
125 CHECK(parameters[1] == FILE_PATH_LITERAL("noloop")) 125 CHECK(parameters[1] == FILE_PATH_LITERAL("noloop"))
126 << "Unknown parameter " << parameters[1] << " to " 126 << "Unknown parameter " << parameters[1] << " to "
127 << switches::kUseFileForFakeAudioCapture << "."; 127 << switches::kUseFileForFakeAudioCapture << ".";
128 looping = false; 128 looping = false;
129 } 129 }
130 return base::WrapUnique(new FileSource(params_, path_to_wav_file, looping)); 130 return base::MakeUnique<FileSource>(params_, path_to_wav_file, looping);
131 } 131 }
132 return base::WrapUnique(new BeepingSource(params_)); 132 return base::MakeUnique<BeepingSource>(params_);
133 } 133 }
134 134
135 void FakeAudioInputStream::BeepOnce() { 135 void FakeAudioInputStream::BeepOnce() {
136 BeepingSource::BeepOnce(); 136 BeepingSource::BeepOnce();
137 } 137 }
138 138
139 } // namespace media 139 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/audio/fake_audio_log_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698