|
|
Created:
6 years, 4 months ago by Anand Mistry (off Chromium) Modified:
6 years, 4 months ago Reviewers:
rpetterson CC:
chromium-reviews, skanuj+watch_chromium.org, melevin+watch_chromium.org, dhollowa+watch_chromium.org, dougw+watch_chromium.org, donnd+watch_chromium.org, dominich, jfweitz+watch_chromium.org, David Black, samarth+watch_chromium.org, kmadhusu+watch_chromium.org, rlp+watch_chromium.org, Jered, chrome-apps-syd-reviews_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Project:
chromium Visibility:
Public. |
DescriptionFall back to the application locale if a profile one doesn't exist on ChromeOS.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=291543
Patch Set 1 #Patch Set 2 : Simplify. #Messages
Total messages: 17 (0 generated)
If we set locale= g_browser_process->GetApplicationLocale(); and then do the check for #ifdef OS_CHROMEOS to determine the per profile option, then we could eliminate the #else. Thoughts? On Aug 21, 2014 8:47 PM, <amistry@chromium.org> wrote: > Reviewers: rpetterson, > > Description: > Fall back to the application locale if a profile one doesn't exist on > ChromeOS. > > Please review this at https://codereview.chromium.org/496223002/ > > SVN Base: https://chromium.googlesource.com/chromium/src.git@master > > Affected files (+4, -0 lines): > M chrome/browser/search/hotword_service.cc > > > Index: chrome/browser/search/hotword_service.cc > diff --git a/chrome/browser/search/hotword_service.cc > b/chrome/browser/search/hotword_service.cc > index 2f75b0394f5b73731f80cbde6ea0afd001deb541.. > 030f35bc2f6892a3bc37aee7e643a0daa0ee9aa0 100644 > --- a/chrome/browser/search/hotword_service.cc > +++ b/chrome/browser/search/hotword_service.cc > @@ -146,6 +146,10 @@ std::string GetCurrentLocale(Profile* profile) { > #if defined(OS_CHROMEOS) > // On ChromeOS locale is per-profile. > profile->GetPrefs()->GetString(prefs::kApplicationLocale); > + if (locale.empty()) { > + // Fallback if locale isn't set. > + locale = g_browser_process->GetApplicationLocale(); > + } > #else > g_browser_process->GetApplicationLocale(); > #endif > > > To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
On 2014/08/22 04:02:10, rpetterson wrote: > If we set locale= g_browser_process->GetApplicationLocale(); and then do > the check for #ifdef OS_CHROMEOS to determine the per profile option, then > we could eliminate the #else. Thoughts? I think this is the cleanest way of doing it. I think it looks a bit better. > On Aug 21, 2014 8:47 PM, <mailto:amistry@chromium.org> wrote: > > > Reviewers: rpetterson, > > > > Description: > > Fall back to the application locale if a profile one doesn't exist on > > ChromeOS. > > > > Please review this at https://codereview.chromium.org/496223002/ > > > > SVN Base: https://chromium.googlesource.com/chromium/src.git@master > > > > Affected files (+4, -0 lines): > > M chrome/browser/search/hotword_service.cc > > > > > > Index: chrome/browser/search/hotword_service.cc > > diff --git a/chrome/browser/search/hotword_service.cc > > b/chrome/browser/search/hotword_service.cc > > index 2f75b0394f5b73731f80cbde6ea0afd001deb541.. > > 030f35bc2f6892a3bc37aee7e643a0daa0ee9aa0 100644 > > --- a/chrome/browser/search/hotword_service.cc > > +++ b/chrome/browser/search/hotword_service.cc > > @@ -146,6 +146,10 @@ std::string GetCurrentLocale(Profile* profile) { > > #if defined(OS_CHROMEOS) > > // On ChromeOS locale is per-profile. > > profile->GetPrefs()->GetString(prefs::kApplicationLocale); > > + if (locale.empty()) { > > + // Fallback if locale isn't set. > > + locale = g_browser_process->GetApplicationLocale(); > > + } > > #else > > g_browser_process->GetApplicationLocale(); > > #endif > > > > > > > > To unsubscribe from this group and stop receiving emails from it, send an email > to mailto:chromium-reviews+unsubscribe@chromium.org.
lgtm
The CQ bit was checked by amistry@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/amistry@chromium.org/496223002/20001
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_chromium_gn_compile_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromiu...) android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tes...) win_chromium_compile_dbg on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromiu...)
The CQ bit was checked by amistry@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/amistry@chromium.org/496223002/20001
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_chromium_gn_compile_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromiu...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromiu...)
The CQ bit was checked by amistry@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/amistry@chromium.org/496223002/20001
Message was sent while issue was closed.
Committed patchset #2 (20001) as 291543 |