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

Issue 2791593002: Allow installer::GetLocalizedString to return mode-specific strings. (Closed)

Created:
3 years, 8 months ago by grt (UTC plus 2)
Modified:
3 years, 8 months ago
CC:
chromium-reviews, grt+watch_chromium.org, pennymac+watch_chromium.org, jshin+watch_chromium.org, wfh+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow installer::GetLocalizedString to return mode-specific strings. Previously, callers needed to get string via a mode-specific string id (e.g., IDS_PRODUCT_NAME or IDS_SXS_SHORTCUT_NAME for Chrome's localized shortcut name). This meant that each caller needed to branch on the mode (either explicitly, or implicitly via BrowserDistribution subclasses). This change specifies mode-specific mappings for strings in create_string_rc.py and plubing in GetLocalizedString so that callers automatically get the proper string at runtime based on the mode at play. As a consequence, the following cleanups in this CL became possible: - GoogleChromeSxSDistribution is removed, as it is no longer serves any purpose. - InstallUtil::IsChromeSxSProcess is removed, as it no longer has any consumers. - I took the liberty of sorting the STRING_IDS array in create_string_rc by ID name. BUG=373987 Review-Url: https://codereview.chromium.org/2791593002 Cr-Commit-Position: refs/heads/master@{#461430} Committed: https://chromium.googlesource.com/chromium/src/+/e8cc5ba9a51193c5759e775c263d2266e84a4a82

Patch Set 1 #

Total comments: 20

Patch Set 2 : manzagop review comments #

Total comments: 2

Patch Set 3 : self review #

Patch Set 4 : manzagop review part the deux #

Unified diffs Side-by-side diffs Delta from patch set Stats (+260 lines, -151 lines) Patch
M chrome/install_static/chromium_install_modes.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/install_static/google_chrome_install_modes.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/installer/util/BUILD.gn View 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/installer/util/browser_distribution.cc View 1 4 chunks +6 lines, -11 lines 0 comments Download
M chrome/installer/util/firewall_manager_win.cc View 2 chunks +1 line, -10 lines 0 comments Download
M chrome/installer/util/google_chrome_distribution.h View 2 chunks +0 lines, -12 lines 0 comments Download
M chrome/installer/util/google_chrome_distribution.cc View 2 chunks +2 lines, -8 lines 0 comments Download
D chrome/installer/util/google_chrome_sxs_distribution.h View 1 chunk +0 lines, -33 lines 0 comments Download
D chrome/installer/util/google_chrome_sxs_distribution.cc View 1 chunk +0 lines, -38 lines 0 comments Download
M chrome/installer/util/install_util.h View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/installer/util/install_util.cc View 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/installer/util/l10n_string_util.h View 1 2 chunks +12 lines, -3 lines 0 comments Download
M chrome/installer/util/l10n_string_util.cc View 1 3 chunks +37 lines, -0 lines 0 comments Download
A chrome/installer/util/l10n_string_util_unittest.cc View 1 2 1 chunk +79 lines, -0 lines 0 comments Download
M chrome/installer/util/prebuild/create_string_rc.py View 1 2 3 9 chunks +116 lines, -19 lines 0 comments Download

Messages

Total messages: 22 (13 generated)
grt (UTC plus 2)
Hi P-A. Do you have time to review this one? Thanks.
3 years, 8 months ago (2017-03-31 11:40:56 UTC) #4
manzagop (departed)
On 2017/03/31 11:40:56, grt (UTC plus 2) wrote: > Hi P-A. Do you have time ...
3 years, 8 months ago (2017-03-31 13:54:59 UTC) #7
manzagop (departed)
lgtm Change looks good! I'm not familiar with our string usage though, so you'll see ...
3 years, 8 months ago (2017-03-31 16:19:01 UTC) #8
manzagop (departed)
lgtm Change looks good! I'm not familiar with our string usage though, so you'll see ...
3 years, 8 months ago (2017-03-31 16:19:06 UTC) #9
grt (UTC plus 2)
PTAL https://codereview.chromium.org/2791593002/diff/1/chrome/installer/util/l10n_string_util_unittest.cc File chrome/installer/util/l10n_string_util_unittest.cc (right): https://codereview.chromium.org/2791593002/diff/1/chrome/installer/util/l10n_string_util_unittest.cc#newcode38 chrome/installer/util/l10n_string_util_unittest.cc:38: On 2017/03/31 16:19:00, manzagop wrote: > Should we ...
3 years, 8 months ago (2017-04-03 11:59:42 UTC) #10
manzagop (departed)
Great! lgtm % nits https://codereview.chromium.org/2791593002/diff/1/chrome/installer/util/prebuild/create_string_rc.py File chrome/installer/util/prebuild/create_string_rc.py (right): https://codereview.chromium.org/2791593002/diff/1/chrome/installer/util/prebuild/create_string_rc.py#newcode103 chrome/installer/util/prebuild/create_string_rc.py:103: 'google_chrome': [ On 2017/04/03 11:59:42, ...
3 years, 8 months ago (2017-04-03 13:06:33 UTC) #15
grt (UTC plus 2)
Thanks. https://codereview.chromium.org/2791593002/diff/1/chrome/installer/util/prebuild/create_string_rc.py File chrome/installer/util/prebuild/create_string_rc.py (right): https://codereview.chromium.org/2791593002/diff/1/chrome/installer/util/prebuild/create_string_rc.py#newcode103 chrome/installer/util/prebuild/create_string_rc.py:103: 'google_chrome': [ On 2017/04/03 13:06:33, manzagop wrote: > ...
3 years, 8 months ago (2017-04-03 13:31:30 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2791593002/60001
3 years, 8 months ago (2017-04-03 13:32:21 UTC) #19
commit-bot: I haz the power
3 years, 8 months ago (2017-04-03 14:51:13 UTC) #22
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/e8cc5ba9a51193c5759e775c263d...

Powered by Google App Engine
This is Rietveld 408576698