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

Issue 1421473009: Translate: Order language names in ASCII for locales ICU doesn't support (Closed)

Created:
5 years, 1 month ago by hajimehoshi
Modified:
5 years, 1 month ago
CC:
chromium-reviews, Miguel Garcia
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Translate: Order language names in ASCII for locales ICU doesn't support This CL fixes the crash at the first usage of an icu::Collator. It seems like that icu::Collator can't be created for some locales especially on Android. In this case, instead of using Collator, let's order the language names in ASCII. BUG=548355 TEST=n/a Committed: https://crrev.com/005fcebeecbf198f2c94da4605e6b6c2b7fc0759 Cr-Commit-Position: refs/heads/master@{#357806}

Patch Set 1 #

Patch Set 2 : #

Total comments: 6

Patch Set 3 : Miguel's review #

Patch Set 4 : #

Total comments: 7

Patch Set 5 : Miguel's review #

Total comments: 2

Patch Set 6 : Miguel's review #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -8 lines) Patch
M components/translate/core/browser/translate_ui_delegate.cc View 1 2 3 4 5 3 chunks +29 lines, -8 lines 1 comment Download

Depends on Patchset:

Messages

Total messages: 16 (5 generated)
hajimehoshi
I wasn't able to reproduce this bug on my Linux environment. Andrew, would it be ...
5 years, 1 month ago (2015-11-02 11:42:54 UTC) #2
Miguel Garcia
Some by pass suggestions, I will let Andrew as the main reviewer l-g-t-m this. https://codereview.chromium.org/1421473009/diff/20001/components/translate/core/browser/translate_ui_delegate.cc ...
5 years, 1 month ago (2015-11-02 12:09:26 UTC) #5
hajimehoshi
Thank you! https://codereview.chromium.org/1421473009/diff/20001/components/translate/core/browser/translate_ui_delegate.cc File components/translate/core/browser/translate_ui_delegate.cc (right): https://codereview.chromium.org/1421473009/diff/20001/components/translate/core/browser/translate_ui_delegate.cc#newcode57 components/translate/core/browser/translate_ui_delegate.cc:57: icu::Collator* collator_instance = icu::Collator::createInstance(loc, error); On 2015/11/02 ...
5 years, 1 month ago (2015-11-04 05:50:30 UTC) #6
Miguel Garcia
https://codereview.chromium.org/1421473009/diff/60001/components/translate/core/browser/translate_ui_delegate.cc File components/translate/core/browser/translate_ui_delegate.cc (right): https://codereview.chromium.org/1421473009/diff/60001/components/translate/core/browser/translate_ui_delegate.cc#newcode33 components/translate/core/browser/translate_ui_delegate.cc:33: scoped_ptr<icu::Collator> CreateCollator(const std::string& locale) { document the return value ...
5 years, 1 month ago (2015-11-04 09:14:59 UTC) #7
hajimehoshi
Thank you! https://codereview.chromium.org/1421473009/diff/60001/components/translate/core/browser/translate_ui_delegate.cc File components/translate/core/browser/translate_ui_delegate.cc (right): https://codereview.chromium.org/1421473009/diff/60001/components/translate/core/browser/translate_ui_delegate.cc#newcode33 components/translate/core/browser/translate_ui_delegate.cc:33: scoped_ptr<icu::Collator> CreateCollator(const std::string& locale) { On 2015/11/04 ...
5 years, 1 month ago (2015-11-04 09:48:49 UTC) #8
Miguel Garcia
lgtm I found out that Andrew is on vacation and since this is a M47 ...
5 years, 1 month ago (2015-11-04 10:30:53 UTC) #9
hajimehoshi
On 2015/11/04 10:30:53, Miguel Garcia wrote: > lgtm > > I found out that Andrew ...
5 years, 1 month ago (2015-11-04 11:22:49 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1421473009/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1421473009/100001
5 years, 1 month ago (2015-11-04 11:24:24 UTC) #13
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 1 month ago (2015-11-04 12:30:05 UTC) #14
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/005fcebeecbf198f2c94da4605e6b6c2b7fc0759 Cr-Commit-Position: refs/heads/master@{#357806}
5 years, 1 month ago (2015-11-04 12:31:01 UTC) #15
Andrew Hayden (chromium.org)
5 years, 1 month ago (2015-11-09 14:09:39 UTC) #16
Message was sent while issue was closed.
I'm back. Thanks, everyone, for taking care of this. LGTM post-submit :)

https://codereview.chromium.org/1421473009/diff/100001/components/translate/c...
File components/translate/core/browser/translate_ui_delegate.cc (right):

https://codereview.chromium.org/1421473009/diff/100001/components/translate/c...
components/translate/core/browser/translate_ui_delegate.cc:41: return nullptr;
It would have been nice to add a comment here indicating that the nullptr return
case is actually expected and normal for some locales with a link to the bug.

Powered by Google App Engine
This is Rietveld 408576698