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

Issue 10224004: Use Android API for GetDisplayNameForLocale(). (Closed)

Created:
8 years, 8 months ago by Xianzhu
Modified:
8 years, 7 months ago
CC:
chromium-reviews, erikwright (departed), brettw-cc_chromium.org, dyu1, dhollowa+watch_chromium.org, Ilya Sherman, jshin+watch_chromium.org
Visibility:
Public.

Description

Use Android API for GetDisplayNameForLocale(). Using Android API, we can reduce the data size of ICU and thus reduce the binary size of chromium-android. BUG=none TEST=L10nUtilTest.GetDisplayNameForLocale,L10nUtilTest.GetDisplayNameForCountry TBR=sky Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=135484

Patch Set 1 #

Total comments: 25

Patch Set 2 : Changes according to review comments #

Patch Set 3 : Remove is_for_ui parameter of GetDisplayNameForCountry #

Patch Set 4 : Add Junshik into ui/base/l10n/OWNERS #

Patch Set 5 : jungshik@chromium.org -> jungshik@google.com #

Total comments: 2

Patch Set 6 : jungshik@google.com->jshin@chromium.org in OWNERS #

Total comments: 5

Patch Set 7 : Add TODOs #

Patch Set 8 : Rebase #

Patch Set 9 : Workaround CQ issue (by removing ui/base/l10n/OWNERS from this CL) #

Patch Set 10 : For landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+279 lines, -38 lines) Patch
A base/android/java/org/chromium/base/LocaleUtils.java View 1 1 chunk +26 lines, -0 lines 0 comments Download
A base/android/locale_utils.h View 1 1 chunk +29 lines, -0 lines 0 comments Download
A base/android/locale_utils.cc View 1 2 3 4 5 6 1 chunk +94 lines, -0 lines 0 comments Download
M base/base.gyp View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M base/base.gypi View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M build/all_android.gyp View 2 chunks +1 line, -1 line 0 comments Download
M build/android/gtest_filter/ui_unittests_disabled View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/autofill/autofill_country.cc View 1 2 3 4 5 6 7 8 9 6 chunks +10 lines, -25 lines 0 comments Download
M testing/android/native_test_launcher.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M ui/base/l10n/l10n_util.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M ui/base/l10n/l10n_util.cc View 1 2 3 4 5 6 7 8 9 2 chunks +37 lines, -10 lines 0 comments Download
M ui/base/l10n/l10n_util_unittest.cc View 1 2 3 chunks +18 lines, -1 line 0 comments Download
M ui/ui_unittests.gypi View 1 2 3 4 5 6 7 3 chunks +51 lines, -1 line 0 comments Download

Messages

Total messages: 41 (0 generated)
Xianzhu
Hi, reviewers, I added you as reviewer because the CL contains changes in the directory ...
8 years, 8 months ago (2012-04-25 19:27:52 UTC) #1
Xianzhu
http://codereview.chromium.org/10224004/diff/1/build/all_android.gyp File build/all_android.gyp (left): http://codereview.chromium.org/10224004/diff/1/build/all_android.gyp#oldcode84 build/all_android.gyp:84: '../ui/ui.gyp:gfx_unittests', This is removed because gfx_unittests is a legacy ...
8 years, 8 months ago (2012-04-25 19:31:01 UTC) #2
Mark Mentovai
I only reviewed the files in base and build. http://codereview.chromium.org/10224004/diff/1/base/android/java/org/chromium/base/LocaleUtils.java File base/android/java/org/chromium/base/LocaleUtils.java (right): http://codereview.chromium.org/10224004/diff/1/base/android/java/org/chromium/base/LocaleUtils.java#newcode22 base/android/java/org/chromium/base/LocaleUtils.java:22: ...
8 years, 8 months ago (2012-04-25 20:00:20 UTC) #3
Ilya Sherman
autofill/ lgtm http://codereview.chromium.org/10224004/diff/1/chrome/browser/autofill/autofill_country.cc File chrome/browser/autofill/autofill_country.cc (right): http://codereview.chromium.org/10224004/diff/1/chrome/browser/autofill/autofill_country.cc#newcode486 chrome/browser/autofill/autofill_country.cc:486: icu::Locale icu_locale(locale.c_str()); nit: This seems to no ...
8 years, 8 months ago (2012-04-25 20:10:35 UTC) #4
John Grabowski
base/android/ LGTM if you can confirm the ui apk compiles and links happily when re-gypping ...
8 years, 8 months ago (2012-04-25 20:32:26 UTC) #5
Mark Mentovai
http://codereview.chromium.org/10224004/diff/1/base/android/locale_utils.h File base/android/locale_utils.h (right): http://codereview.chromium.org/10224004/diff/1/base/android/locale_utils.h#newcode7 base/android/locale_utils.h:7: John Grabowski wrote: > On 2012/04/25 20:00:20, Mark Mentovai ...
8 years, 8 months ago (2012-04-25 20:39:56 UTC) #6
sky
http://codereview.chromium.org/10224004/diff/1/ui/base/l10n/l10n_util.cc File ui/base/l10n/l10n_util.cc (right): http://codereview.chromium.org/10224004/diff/1/ui/base/l10n/l10n_util.cc#newcode521 ui/base/l10n/l10n_util.cc:521: return GetDisplayNameForLocale("_" + country_code, display_locale, is_for_ui); This hardly seems ...
8 years, 8 months ago (2012-04-25 21:06:42 UTC) #7
Xianzhu
http://codereview.chromium.org/10224004/diff/1/base/android/java/org/chromium/base/LocaleUtils.java File base/android/java/org/chromium/base/LocaleUtils.java (right): http://codereview.chromium.org/10224004/diff/1/base/android/java/org/chromium/base/LocaleUtils.java#newcode22 base/android/java/org/chromium/base/LocaleUtils.java:22: return locale.getLanguage() + "-" + locale.getCountry(); On 2012/04/25 20:00:20, ...
8 years, 8 months ago (2012-04-25 22:31:46 UTC) #8
Xianzhu
http://codereview.chromium.org/10224004/diff/1/ui/base/l10n/l10n_util.cc File ui/base/l10n/l10n_util.cc (right): http://codereview.chromium.org/10224004/diff/1/ui/base/l10n/l10n_util.cc#newcode521 ui/base/l10n/l10n_util.cc:521: return GetDisplayNameForLocale("_" + country_code, display_locale, is_for_ui); On 2012/04/25 21:06:43, ...
8 years, 8 months ago (2012-04-25 22:36:23 UTC) #9
Mark Mentovai
http://codereview.chromium.org/10224004/diff/1/base/android/java/org/chromium/base/LocaleUtils.java File base/android/java/org/chromium/base/LocaleUtils.java (right): http://codereview.chromium.org/10224004/diff/1/base/android/java/org/chromium/base/LocaleUtils.java#newcode22 base/android/java/org/chromium/base/LocaleUtils.java:22: return locale.getLanguage() + "-" + locale.getCountry(); Xianzhu wrote: > ...
8 years, 8 months ago (2012-04-25 22:38:51 UTC) #10
Xianzhu
http://codereview.chromium.org/10224004/diff/1/chrome/browser/autofill/autofill_country.cc File chrome/browser/autofill/autofill_country.cc (right): http://codereview.chromium.org/10224004/diff/1/chrome/browser/autofill/autofill_country.cc#newcode497 chrome/browser/autofill/autofill_country.cc:497: locale, false); On 2012/04/25 20:10:36, Ilya Sherman wrote: > ...
8 years, 8 months ago (2012-04-25 22:49:27 UTC) #11
Xianzhu
http://codereview.chromium.org/10224004/diff/1/base/android/java/org/chromium/base/LocaleUtils.java File base/android/java/org/chromium/base/LocaleUtils.java (right): http://codereview.chromium.org/10224004/diff/1/base/android/java/org/chromium/base/LocaleUtils.java#newcode22 base/android/java/org/chromium/base/LocaleUtils.java:22: return locale.getLanguage() + "-" + locale.getCountry(); On 2012/04/25 22:38:51, ...
8 years, 8 months ago (2012-04-25 22:53:15 UTC) #12
Xianzhu
On 2012/04/25 22:53:15, Xianzhu wrote: > Sorry I forgot to mention I would make the ...
8 years, 8 months ago (2012-04-25 22:57:21 UTC) #13
Mark Mentovai
LGTM in base. I only reviewed in that directory.
8 years, 8 months ago (2012-04-26 15:54:17 UTC) #14
Xianzhu
On 2012/04/25 22:36:23, Xianzhu wrote: > http://codereview.chromium.org/10224004/diff/1/ui/base/l10n/l10n_util.cc > File ui/base/l10n/l10n_util.cc (right): > > http://codereview.chromium.org/10224004/diff/1/ui/base/l10n/l10n_util.cc#newcode521 > ...
8 years, 8 months ago (2012-04-26 16:15:49 UTC) #15
sky
On Wed, Apr 25, 2012 at 3:36 PM, <wangxianzhu@chromium.org> wrote: > > http://codereview.chromium.org/10224004/diff/1/ui/base/l10n/l10n_util.cc > File ...
8 years, 8 months ago (2012-04-26 16:17:03 UTC) #16
Xianzhu
> I'm not sure I understand. > > I'm suggesting instead of adding GetDisplayNameForCountry you ...
8 years, 8 months ago (2012-04-26 16:49:05 UTC) #17
sky
On Thu, Apr 26, 2012 at 9:49 AM, <wangxianzhu@chromium.org> wrote: >> I'm not sure I ...
8 years, 8 months ago (2012-04-26 17:55:07 UTC) #18
Xianzhu
On 2012/04/26 17:55:07, sky wrote: > On Thu, Apr 26, 2012 at 9:49 AM, <mailto:wangxianzhu@chromium.org> ...
8 years, 8 months ago (2012-04-26 18:18:26 UTC) #19
tony
The code change LGTM, but Jungshik may have some additional feedback. https://chromiumcodereview.appspot.com/10224004/diff/17001/ui/base/l10n/l10n_util.cc File ui/base/l10n/l10n_util.cc (right): ...
8 years, 8 months ago (2012-04-27 20:29:27 UTC) #20
Xianzhu
https://chromiumcodereview.appspot.com/10224004/diff/17001/ui/base/l10n/l10n_util.cc File ui/base/l10n/l10n_util.cc (right): https://chromiumcodereview.appspot.com/10224004/diff/17001/ui/base/l10n/l10n_util.cc#newcode494 ui/base/l10n/l10n_util.cc:494: // zh-Hant because Java API doesn't support scripts. On ...
8 years, 8 months ago (2012-04-27 20:47:25 UTC) #21
tony
On 2012/04/27 20:47:25, Xianzhu wrote: > https://chromiumcodereview.appspot.com/10224004/diff/17001/ui/base/l10n/l10n_util.cc > File ui/base/l10n/l10n_util.cc (right): > > https://chromiumcodereview.appspot.com/10224004/diff/17001/ui/base/l10n/l10n_util.cc#newcode494 > ...
8 years, 8 months ago (2012-04-27 22:39:40 UTC) #22
Xianzhu
On 2012/04/27 22:39:40, tony wrote: > On 2012/04/27 20:47:25, Xianzhu wrote: > > > https://chromiumcodereview.appspot.com/10224004/diff/17001/ui/base/l10n/l10n_util.cc ...
8 years, 8 months ago (2012-04-27 23:00:55 UTC) #23
tony
On 2012/04/27 23:00:55, Xianzhu wrote: > We intentionally use zh-Hans and zh-Hant to get display ...
8 years, 8 months ago (2012-04-27 23:23:37 UTC) #24
jungshik at Google
https://chromiumcodereview.appspot.com/10224004/diff/22001/base/android/locale_utils.cc File base/android/locale_utils.cc (right): https://chromiumcodereview.appspot.com/10224004/diff/22001/base/android/locale_utils.cc#newcode61 base/android/locale_utils.cc:61: ConvertUTF8ToJavaString(env, variant).obj())); Does "Java on Android" support Java 7 ...
8 years, 7 months ago (2012-05-04 17:46:03 UTC) #25
wangxianzhu
https://chromiumcodereview.appspot.com/10224004/diff/22001/base/android/locale_utils.cc File base/android/locale_utils.cc (right): https://chromiumcodereview.appspot.com/10224004/diff/22001/base/android/locale_utils.cc#newcode61 base/android/locale_utils.cc:61: ConvertUTF8ToJavaString(env, variant).obj())); On 2012/05/04 17:46:03, Jungshik Shin wrote: > ...
8 years, 7 months ago (2012-05-04 18:13:42 UTC) #26
jungshik at Google
LGTM https://chromiumcodereview.appspot.com/10224004/diff/22001/ui/base/l10n/l10n_util.cc File ui/base/l10n/l10n_util.cc (right): https://chromiumcodereview.appspot.com/10224004/diff/22001/ui/base/l10n/l10n_util.cc#newcode520 ui/base/l10n/l10n_util.cc:520: return GetDisplayNameForLocale("_" + country_code, display_locale, false); On 2012/05/04 ...
8 years, 7 months ago (2012-05-04 18:30:43 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/10224004/29002
8 years, 7 months ago (2012-05-04 18:33:35 UTC) #28
commit-bot: I haz the power
Can't process patch for file ui/base/l10n/OWNERS. Hunk header is incorrect: 1 vs 2
8 years, 7 months ago (2012-05-04 18:33:45 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/10224004/26004
8 years, 7 months ago (2012-05-04 18:39:05 UTC) #30
commit-bot: I haz the power
Can't process patch for file ui/base/l10n/OWNERS. Hunk header is incorrect: 1 vs 2
8 years, 7 months ago (2012-05-04 18:39:09 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/10224004/26004
8 years, 7 months ago (2012-05-04 18:47:08 UTC) #32
commit-bot: I haz the power
Can't process patch for file ui/base/l10n/OWNERS. Hunk header is incorrect: 1 vs 2
8 years, 7 months ago (2012-05-04 18:47:13 UTC) #33
tony
On 2012/05/04 18:47:13, I haz the power (commit-bot) wrote: > Can't process patch for file ...
8 years, 7 months ago (2012-05-04 18:50:23 UTC) #34
wangxianzhu
Seems a bug of CQ script? The "hunk header" of the OWNERS file is "@@ ...
8 years, 7 months ago (2012-05-04 18:57:06 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/10224004/34002
8 years, 7 months ago (2012-05-04 19:00:06 UTC) #36
commit-bot: I haz the power
Presubmit check for 10224004-34002 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 7 months ago (2012-05-04 19:00:21 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/10224004/34002
8 years, 7 months ago (2012-05-04 19:05:34 UTC) #38
commit-bot: I haz the power
Try job failure for 10224004-34002 on win_rel for step "update". http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=25932 Step "update" is always ...
8 years, 7 months ago (2012-05-04 19:16:40 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/10224004/34005
8 years, 7 months ago (2012-05-04 22:01:45 UTC) #40
commit-bot: I haz the power
8 years, 7 months ago (2012-05-04 23:33:02 UTC) #41
Change committed as 135484

Powered by Google App Engine
This is Rietveld 408576698