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

Unified Diff: media/audio/fake_audio_input_stream.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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
Index: media/audio/fake_audio_input_stream.cc
diff --git a/media/audio/fake_audio_input_stream.cc b/media/audio/fake_audio_input_stream.cc
index 52d7218d2870da974913803fe97a1989f290f4e3..1ef31a9e10c130bb7dce5153f052092123ed37e1 100644
--- a/media/audio/fake_audio_input_stream.cc
+++ b/media/audio/fake_audio_input_stream.cc
@@ -116,15 +116,14 @@ std::unique_ptr<AudioSourceCallback> FakeAudioInputStream::ChooseSource() {
base::CommandLine::StringVector parameters =
base::SplitString(switch_value, FILE_PATH_LITERAL("%"),
base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
- CHECK(parameters.size() > 0) << "You must pass <file>[%noloop] to --"
- << switches::kUseFileForFakeAudioCapture
- << ".";
+ LOG_IF(FATAL, parameters.empty()) << "You must pass <file>[%noloop] to --"
+ << switches::kUseFileForFakeAudioCapture
+ << ".";
+
base::FilePath path_to_wav_file = base::FilePath(parameters[0]);
bool looping = true;
if (parameters.size() == 2) {
- CHECK(parameters[1] == FILE_PATH_LITERAL("noloop"))
- << "Unknown parameter " << parameters[1] << " to "
- << switches::kUseFileForFakeAudioCapture << ".";
+ CHECK(parameters[1] == FILE_PATH_LITERAL("noloop"));
looping = false;
}
return base::MakeUnique<FileSource>(params_, path_to_wav_file, looping);

Powered by Google App Engine
This is Rietveld 408576698