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

Unified Diff: content/browser/speech/google_streaming_remote_engine.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 | « no previous file | content/public/common/speech_recognition_error.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/speech/google_streaming_remote_engine.cc
diff --git a/content/browser/speech/google_streaming_remote_engine.cc b/content/browser/speech/google_streaming_remote_engine.cc
index ca8e906ec30bec43e71103be4d113137189fea70..22a3eb37a5a74d3102e85fa45e0c6c36e2507c77 100644
--- a/content/browser/speech/google_streaming_remote_engine.cc
+++ b/content/browser/speech/google_streaming_remote_engine.cc
@@ -449,16 +449,13 @@ GoogleStreamingRemoteEngine::ProcessDownstreamResponse(
case proto::SpeechRecognitionEvent::STATUS_NETWORK:
return Abort(SPEECH_RECOGNITION_ERROR_NETWORK);
case proto::SpeechRecognitionEvent::STATUS_NOT_ALLOWED:
- // TODO(hans): We need a better error code for this.
- return Abort(SPEECH_RECOGNITION_ERROR_ABORTED);
+ return Abort(SPEECH_RECOGNITION_ERROR_NOT_ALLOWED);
case proto::SpeechRecognitionEvent::STATUS_SERVICE_NOT_ALLOWED:
- // TODO(hans): We need a better error code for this.
- return Abort(SPEECH_RECOGNITION_ERROR_ABORTED);
+ return Abort(SPEECH_RECOGNITION_ERROR_SERVICE_NOT_ALLOWED);
case proto::SpeechRecognitionEvent::STATUS_BAD_GRAMMAR:
return Abort(SPEECH_RECOGNITION_ERROR_BAD_GRAMMAR);
case proto::SpeechRecognitionEvent::STATUS_LANGUAGE_NOT_SUPPORTED:
- // TODO(hans): We need a better error code for this.
- return Abort(SPEECH_RECOGNITION_ERROR_ABORTED);
+ return Abort(SPEECH_RECOGNITION_ERROR_LANGUAGE_NOT_SUPPORTED);
}
}
« no previous file with comments | « no previous file | content/public/common/speech_recognition_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698