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

Issue 126223: Replace std:;wstring with std::string in locale-name related APIs.... (Closed)

Created:
11 years, 6 months ago by jungshik at Google
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Replace std:;wstring with std::string and string16 in locale-name related APIs. 1. Change the locale param to be std::string because they're always ASCII and change call-sites accordingly. 2. Add GetStringFUTF16 to l10n_util. On Windows, they're inline helpers calling the correspondingGetStringF returning wstring while on Mac/Linux, they just return the result of |string16 GetStringF|without converting to wstring. This is part 1 of the fix for issue 8647. Some of newly introduced conversions are temporary and will be removed later (e.g. ASCIIToWide applied to the result of GetApplicationLocale in a few places). Note : this CL will be landed after http://codereview.chromium.org/147038 is landed. BUG=8647 (http://crbug.com/8647) TEST=Pass l10n_util_unittest and other unit tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=19183

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 4

Patch Set 8 : '' #

Patch Set 9 : '' #

Total comments: 2

Patch Set 10 : '' #

Patch Set 11 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+339 lines, -231 lines) Patch
M app/l10n_util.h View 1 2 3 4 5 6 7 8 9 7 chunks +55 lines, -14 lines 0 comments Download
M app/l10n_util.cc View 1 2 3 4 5 6 7 8 9 14 chunks +82 lines, -67 lines 0 comments Download
M app/l10n_util_posix.cc View 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M app/l10n_util_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +46 lines, -46 lines 0 comments Download
M app/l10n_util_win.cc View 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M app/resource_bundle_linux.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M app/resource_bundle_win.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M base/file_util.h View 2 3 4 5 6 7 8 9 2 chunks +6 lines, -1 line 0 comments Download
MM base/file_util_icu.cc View 2 3 4 5 6 7 8 9 10 4 chunks +55 lines, -16 lines 0 comments Download
M chrome/browser/automation/automation_provider.cc View 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/bookmarks/bookmark_model.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browser_process.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browser_process_impl.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/character_encoding.h View 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/character_encoding.cc View 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/first_run_win.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/google_util.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/plugin_service.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/browser_render_process_host.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/search_engines/template_url.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/search_engines/template_url_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.h View 6 7 8 9 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.cc View 1 2 3 4 5 6 7 8 9 6 chunks +20 lines, -16 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu_gtk.h View 5 6 7 8 9 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu_gtk.cc View 5 6 7 8 9 3 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu_mac.h View 5 6 7 8 9 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu_mac.mm View 5 6 7 8 9 4 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/views/options/fonts_page_view.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/views/options/language_combobox_model.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/views/options/languages_page_view.cc View 1 2 3 4 5 6 7 8 9 3 chunks +13 lines, -10 lines 0 comments Download
M chrome/test/automated_ui_tests/automated_ui_tests.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/testing_browser_process.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/test/unit/chrome_test_suite.h View 8 9 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
jungshik at Google
11 years, 6 months ago (2009-06-23 22:01:10 UTC) #1
Evan Stade
lgtm for the files that end in gtk or linux
11 years, 6 months ago (2009-06-23 22:07:59 UTC) #2
brettw
http://codereview.chromium.org/126223/diff/6001/7002 File app/l10n_util.h (right): http://codereview.chromium.org/126223/diff/6001/7002#newcode76 Line 76: string16 GetStringFUTF16(int message_id, Long term, we want to ...
11 years, 6 months ago (2009-06-23 22:35:14 UTC) #3
jungshik at Google
http://codereview.chromium.org/126223/diff/6001/7002 File app/l10n_util.h (right): http://codereview.chromium.org/126223/diff/6001/7002#newcode76 Line 76: string16 GetStringFUTF16(int message_id, On 2009/06/23 22:35:15, brettw wrote: ...
11 years, 6 months ago (2009-06-24 00:15:22 UTC) #4
brettw
okay
11 years, 6 months ago (2009-06-24 00:28:54 UTC) #5
pink (ping after 24hrs)
*_mac LGTM
11 years, 6 months ago (2009-06-24 14:14:16 UTC) #6
tony
11 years, 6 months ago (2009-06-24 14:49:14 UTC) #7
LGTM, thanks a lot for doing this.

http://codereview.chromium.org/126223/diff/5122/4153
File base/file_util_icu.cc (right):

http://codereview.chromium.org/126223/diff/5122/4153#newcode75
Line 75: Singleton<IllegalCharacters> illegal_characters;
Should this be a LazyInstance?  Maybe do it as a follow up change.

http://codereview.chromium.org/126223/diff/5122/4139
File chrome/browser/autocomplete/autocomplete_edit_view_win.cc (right):

http://codereview.chromium.org/126223/diff/5122/4139#newcode1184
Line 1184: if (static_cast<int>(text.length()) >= GetTextLength()) {
Did you mean to include this file in the change list?

Powered by Google App Engine
This is Rietveld 408576698