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

Issue 4896001: Locale access from the IO thread for null language tags in speech. (Closed)

Created:
10 years, 1 month ago by Leandro Graciá Gil
Modified:
9 years, 7 months ago
CC:
chromium-reviews, ben+cc_chromium.org
Visibility:
Public.

Description

In the current speech input implementation, the application locale is used as language in case that no language attribute is provided. For this, the l10n_util::GetApplicationLocale was used from the IO thread. However this is not valid since that function requires file access. After considering different options this patch now uses the first of the accepted languages, defaulting to "en-US" in case that this list is empty. BUG=53598 TEST=SpeechRecognitionRequestTest Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=66605

Patch Set 1 #

Patch Set 2 : now using the first of the accepted languages. #

Total comments: 1

Patch Set 3 : fixed problem that caused the unit test to crash. #

Total comments: 2

Patch Set 4 : code review fixes. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -5 lines) Patch
M chrome/browser/speech/speech_recognition_request.cc View 1 2 3 3 chunks +16 lines, -5 lines 1 comment Download

Messages

Total messages: 9 (0 generated)
Leandro Graciá Gil
10 years, 1 month ago (2010-11-12 15:12:41 UTC) #1
Leandro Graciá Gil
Currently considering possible alternatives after talking with jabdelmalek. Please ignore this review for the moment.
10 years, 1 month ago (2010-11-12 18:00:33 UTC) #2
Leandro Graciá Gil
After talking with Satish we have decided to use the 1st accepted language instead of ...
10 years, 1 month ago (2010-11-15 16:52:11 UTC) #3
Leandro Graciá Gil
http://codereview.chromium.org/4896001/diff/4001/chrome/browser/speech/speech_recognition_request.cc File chrome/browser/speech/speech_recognition_request.cc (right): http://codereview.chromium.org/4896001/diff/4001/chrome/browser/speech/speech_recognition_request.cc#newcode132 chrome/browser/speech/speech_recognition_request.cc:132: // If no language is provided then we use ...
10 years, 1 month ago (2010-11-15 16:57:06 UTC) #4
Leandro Graciá Gil
The unittest should be fixed now.
10 years, 1 month ago (2010-11-16 12:00:01 UTC) #5
Satish
TEST= should not be left empty. You could either specify 'none' if no relevant tests ...
10 years, 1 month ago (2010-11-16 14:23:41 UTC) #6
Leandro Graciá Gil
http://codereview.chromium.org/4896001/diff/9001/chrome/browser/speech/speech_recognition_request.cc File chrome/browser/speech/speech_recognition_request.cc (right): http://codereview.chromium.org/4896001/diff/9001/chrome/browser/speech/speech_recognition_request.cc#newcode145 chrome/browser/speech/speech_recognition_request.cc:145: if (language.empty()) language = "en-US"; On 2010/11/16 14:23:42, Satish ...
10 years, 1 month ago (2010-11-16 17:03:00 UTC) #7
Satish
LGTM Please check with the other reviewers as well before submitting.
10 years, 1 month ago (2010-11-17 10:45:34 UTC) #8
jam
10 years, 1 month ago (2010-11-17 17:58:59 UTC) #9
lgtm, thanks for fixing this

http://codereview.chromium.org/4896001/diff/14001/chrome/browser/speech/speec...
File chrome/browser/speech/speech_recognition_request.cc (right):

http://codereview.chromium.org/4896001/diff/14001/chrome/browser/speech/speec...
chrome/browser/speech/speech_recognition_request.cc:143: if (lang_param.empty())
lang_param = "en-US";
nit: while this isn't against the style guide, it makes debugging harder because
it's not possible to set breakpoints.  two lines would be nicer.

Powered by Google App Engine
This is Rietveld 408576698