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

Unified Diff: content/renderer/speech_recognition_dispatcher.cc

Issue 1073513002: Fix to proper error type on SpeechRecognition (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
« no previous file with comments | « content/public/common/speech_recognition_error.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/speech_recognition_dispatcher.cc
diff --git a/content/renderer/speech_recognition_dispatcher.cc b/content/renderer/speech_recognition_dispatcher.cc
index dea16bc5cfe07c1f668b1c89f87d54307e9aa873..b510ae80ed6a3f0e31466b62cf38dcdf345daed2 100644
--- a/content/renderer/speech_recognition_dispatcher.cc
+++ b/content/renderer/speech_recognition_dispatcher.cc
@@ -164,6 +164,8 @@ static WebSpeechRecognizerClient::ErrorCode WebKitErrorCode(
case SPEECH_RECOGNITION_ERROR_NONE:
NOTREACHED();
return WebSpeechRecognizerClient::OtherError;
+ case SPEECH_RECOGNITION_ERROR_NO_SPEECH:
+ return WebSpeechRecognizerClient::NoSpeechError;
case SPEECH_RECOGNITION_ERROR_ABORTED:
return WebSpeechRecognizerClient::AbortedError;
case SPEECH_RECOGNITION_ERROR_AUDIO:
@@ -172,13 +174,15 @@ static WebSpeechRecognizerClient::ErrorCode WebKitErrorCode(
return WebSpeechRecognizerClient::NetworkError;
case SPEECH_RECOGNITION_ERROR_NOT_ALLOWED:
return WebSpeechRecognizerClient::NotAllowedError;
- case SPEECH_RECOGNITION_ERROR_NO_SPEECH:
- return WebSpeechRecognizerClient::NoSpeechError;
+ case SPEECH_RECOGNITION_ERROR_SERVICE_NOT_ALLOWED:
+ return WebSpeechRecognizerClient::ServiceNotAllowedError;
+ case SPEECH_RECOGNITION_ERROR_BAD_GRAMMAR:
+ return WebSpeechRecognizerClient::BadGrammarError;
+ case SPEECH_RECOGNITION_ERROR_LANGUAGE_NOT_SUPPORTED:
+ return WebSpeechRecognizerClient::LanguageNotSupportedError;
case SPEECH_RECOGNITION_ERROR_NO_MATCH:
NOTREACHED();
return WebSpeechRecognizerClient::OtherError;
- case SPEECH_RECOGNITION_ERROR_BAD_GRAMMAR:
- return WebSpeechRecognizerClient::BadGrammarError;
}
NOTREACHED();
return WebSpeechRecognizerClient::OtherError;
« no previous file with comments | « content/public/common/speech_recognition_error.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698