diff options
Diffstat (limited to 'content/browser/speech/speech_recognizer.cc')
-rw-r--r-- | content/browser/speech/speech_recognizer.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/content/browser/speech/speech_recognizer.cc b/content/browser/speech/speech_recognizer.cc index 3b7b89e..3b9201a 100644 --- a/content/browser/speech/speech_recognizer.cc +++ b/content/browser/speech/speech_recognizer.cc @@ -278,8 +278,9 @@ void SpeechRecognizer::HandleOnData(string* data) { void SpeechRecognizer::SetRecognitionResult( bool error, const SpeechInputResultArray& result) { - if (result.empty()) { - InformErrorAndCancelRecognition(RECOGNIZER_ERROR_NO_RESULTS); + if (error || result.empty()) { + InformErrorAndCancelRecognition(error ? RECOGNIZER_ERROR_NETWORK : + RECOGNIZER_ERROR_NO_RESULTS); return; } |