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

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

Issue 1075443004: Rename from ERROR_AUDIO to ERROR_AUDIO_CAPTURE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: content/browser/speech/speech_recognizer_impl.cc
diff --git a/content/browser/speech/speech_recognizer_impl.cc b/content/browser/speech/speech_recognizer_impl.cc
index 7b1d53f5d474d9dbdeb128a433e476ef0e39994a..a08ffe17661af3b5ecaeffa381fa22b8a0c6308f 100644
--- a/content/browser/speech/speech_recognizer_impl.cc
+++ b/content/browser/speech/speech_recognizer_impl.cc
@@ -503,7 +503,7 @@ SpeechRecognizerImpl::StartRecording(const FSMEventArgs&) {
// TODO(xians): Check if the OS has the device with |device_id_|, return
// |SPEECH_AUDIO_ERROR_DETAILS_NO_MIC| if the target device does not exist.
if (!audio_manager->HasAudioInputDevices()) {
- return Abort(SpeechRecognitionError(SPEECH_RECOGNITION_ERROR_AUDIO,
+ return Abort(SpeechRecognitionError(SPEECH_RECOGNITION_ERROR_AUDIO_CAPTURE,
SPEECH_AUDIO_ERROR_DETAILS_NO_MIC));
}
@@ -513,7 +513,8 @@ SpeechRecognizerImpl::StartRecording(const FSMEventArgs&) {
device_id_);
if (!in_params.IsValid() && !unit_test_is_active) {
DLOG(ERROR) << "Invalid native audio input parameters";
- return Abort(SpeechRecognitionError(SPEECH_RECOGNITION_ERROR_AUDIO));
+ return Abort(
+ SpeechRecognitionError(SPEECH_RECOGNITION_ERROR_AUDIO_CAPTURE));
}
// Audio converter shall provide audio based on these parameters as output.
@@ -564,7 +565,8 @@ SpeechRecognizerImpl::StartRecording(const FSMEventArgs&) {
audio_manager, this, input_parameters, device_id_, NULL);
if (!audio_controller_.get()) {
- return Abort(SpeechRecognitionError(SPEECH_RECOGNITION_ERROR_AUDIO));
+ return Abort(
+ SpeechRecognitionError(SPEECH_RECOGNITION_ERROR_AUDIO_CAPTURE));
}
audio_log_->OnCreated(0, input_parameters, device_id_);
@@ -649,7 +651,8 @@ SpeechRecognizerImpl::AbortSilently(const FSMEventArgs& event_args) {
SpeechRecognizerImpl::FSMState
SpeechRecognizerImpl::AbortWithError(const FSMEventArgs& event_args) {
if (event_args.event == EVENT_AUDIO_ERROR) {
- return Abort(SpeechRecognitionError(SPEECH_RECOGNITION_ERROR_AUDIO));
+ return Abort(
+ SpeechRecognitionError(SPEECH_RECOGNITION_ERROR_AUDIO_CAPTURE));
} else if (event_args.event == EVENT_ENGINE_ERROR) {
return Abort(event_args.engine_error);
}
« no previous file with comments | « content/browser/speech/google_streaming_remote_engine.cc ('k') | content/browser/speech/speech_recognizer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698