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

Issue 23095006: If user profile doesn't contain language setting, default to his Google account settings. (Closed)

Created:
7 years, 4 months ago by Alexander Alekseev
Modified:
7 years, 3 months ago
CC:
chromium-reviews, oshima+watch_chromium.org, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org, jshin+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

When user first time logs into Chromeos, he doesn't have "language" setting filled in his Chromeos profile. So he will inherit owner's locale. We can improve this experience defaulting to his Google Account locale. So that the actual algorithm of language selection looks like this: 1) Use "language" setting from profile. 2) If failed, use "locale" setting from Google Account. 3) If failed, use owner's default. BUG=chromium:140591 TEST= 1) Remove user from device. 2) Clear user profile in https://www.google.com/settings/chrome/sync 3) Set Account language to some different to owners locale. 4) Login to device should now either use Account language immediately after login, or "Locale changed" message should appear after Account data is synchronized. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=224862

Patch Set 1 #

Patch Set 2 : Fix profile_downloader_unittest. #

Patch Set 3 : Fix unittests. #

Patch Set 4 : Fix shared build. #

Total comments: 13

Patch Set 5 : Moved all additional members from Profile to User. #

Patch Set 6 : Added comment on "list of preferred languages". #

Total comments: 16

Patch Set 7 : Moved #if OS_MACOSX away from header. Added unit test for locale field in Account JSON. #

Patch Set 8 : Fix build. #

Total comments: 8

Patch Set 9 : Fix Multi Profile support. #

Total comments: 2

Patch Set 10 : Added support for Multi Profile mode. Rebased. #

Patch Set 11 : Multi Profile mode fix. #

Patch Set 12 : Update comments. #

Patch Set 13 : Rebase. #

Patch Set 14 : Rebase. #

Patch Set 15 : Fix tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+415 lines, -152 lines) Patch
M chrome/browser/chromeos/login/fake_user_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/fake_user_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/login_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +3 lines, -34 lines 0 comments Download
M chrome/browser/chromeos/login/mock_user_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/user.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +26 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/user.cc View 1 2 3 4 5 6 7 8 9 3 chunks +26 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/user_image_manager_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/login/user_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/user_manager_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +16 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/user_manager_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +126 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_downloader.h View 1 2 3 4 5 6 7 8 9 3 chunks +13 lines, -9 lines 0 comments Download
M chrome/browser/profiles/profile_downloader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +27 lines, -11 lines 0 comments Download
M chrome/browser/profiles/profile_downloader_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +79 lines, -28 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -1 line 0 comments Download
M ui/base/l10n/l10n_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 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 10 11 12 13 14 2 chunks +69 lines, -64 lines 0 comments Download

Messages

Total messages: 40 (0 generated)
Alexander Alekseev
The idea is to wait until G+ profile and Chromeos User profile are both loaded ...
7 years, 4 months ago (2013-08-23 03:50:52 UTC) #1
sail
CL description needs work: - first line should be a short summary (need to update ...
7 years, 4 months ago (2013-08-23 04:45:20 UTC) #2
yosin_UTC9
ACK for chrome/browser/profiles/off_the_record_profile_impl*
7 years, 4 months ago (2013-08-23 07:41:12 UTC) #3
sky
I think you only need me for chrome/test/base/testing_profile.h. You have other owners for profiles. That ...
7 years, 4 months ago (2013-08-23 16:02:56 UTC) #4
sail
https://codereview.chromium.org/23095006/diff/18001/chrome/browser/profiles/profile_impl.cc File chrome/browser/profiles/profile_impl.cc (right): https://codereview.chromium.org/23095006/diff/18001/chrome/browser/profiles/profile_impl.cc#newcode146 chrome/browser/profiles/profile_impl.cc:146: COMPILE_ASSERT(sizeof(ProfileImpl) <= 744u, profile_impl_size_unexpected); Your CL will probably break ...
7 years, 4 months ago (2013-08-23 17:08:48 UTC) #5
Nikita (slow)
https://codereview.chromium.org/23095006/diff/18001/chrome/browser/chromeos/login/user_image_manager_impl.cc File chrome/browser/chromeos/login/user_image_manager_impl.cc (right): https://codereview.chromium.org/23095006/diff/18001/chrome/browser/chromeos/login/user_image_manager_impl.cc#newcode648 chrome/browser/chromeos/login/user_image_manager_impl.cc:648: SetGPlusProfileLocale(downloader->GetProfileLocale()); nit: SetGPlusProfileLocale - this method needs to be ...
7 years, 3 months ago (2013-08-26 09:26:13 UTC) #6
jungshik at Google
https://codereview.chromium.org/23095006/diff/18001/chrome/browser/profiles/profile_impl.cc File chrome/browser/profiles/profile_impl.cc (right): https://codereview.chromium.org/23095006/diff/18001/chrome/browser/profiles/profile_impl.cc#newcode1078 chrome/browser/profiles/profile_impl.cc:1078: l10n_util::CheckAndResolveLocale(gplus_locale, gplus_locale_.get()); This does not take into account the ...
7 years, 3 months ago (2013-08-26 16:42:50 UTC) #7
Alexander Alekseev
https://codereview.chromium.org/23095006/diff/18001/chrome/browser/chromeos/login/user_image_manager_impl.cc File chrome/browser/chromeos/login/user_image_manager_impl.cc (right): https://codereview.chromium.org/23095006/diff/18001/chrome/browser/chromeos/login/user_image_manager_impl.cc#newcode648 chrome/browser/chromeos/login/user_image_manager_impl.cc:648: SetGPlusProfileLocale(downloader->GetProfileLocale()); On 2013/08/26 09:26:13, nkostylev (OOO Aug 27 - ...
7 years, 3 months ago (2013-09-06 19:52:07 UTC) #8
Alexander Alekseev
Please review updated version. I moved all data from Profile to User object. Added dpolukhin ...
7 years, 3 months ago (2013-09-06 19:54:17 UTC) #9
Dmitry Polukhin
https://codereview.chromium.org/23095006/diff/33001/chrome/browser/chromeos/login/user.h File chrome/browser/chromeos/login/user.h (right): https://codereview.chromium.org/23095006/diff/33001/chrome/browser/chromeos/login/user.h#newcode179 chrome/browser/chromeos/login/user.h:179: // Used only by UserManagerImpl Do we need such ...
7 years, 3 months ago (2013-09-06 20:30:04 UTC) #10
sail
profiles/* LGTM https://codereview.chromium.org/23095006/diff/33001/chrome/browser/profiles/profile_downloader_unittest.cc File chrome/browser/profiles/profile_downloader_unittest.cc (right): https://codereview.chromium.org/23095006/diff/33001/chrome/browser/profiles/profile_downloader_unittest.cc#newcode39 chrome/browser/profiles/profile_downloader_unittest.cc:39: std::string parsed_locale; could you add a test ...
7 years, 3 months ago (2013-09-09 22:02:17 UTC) #11
Alexander Alekseev
Moved away #if !defined(OS_MACOSX) from header. Added unit test for locale field in GAIA account ...
7 years, 3 months ago (2013-09-11 18:53:02 UTC) #12
sail
lgtm again, thanks for the test https://codereview.chromium.org/23095006/diff/57001/chrome/browser/profiles/profile_downloader_unittest.cc File chrome/browser/profiles/profile_downloader_unittest.cc (right): https://codereview.chromium.org/23095006/diff/57001/chrome/browser/profiles/profile_downloader_unittest.cc#newcode91 chrome/browser/profiles/profile_downloader_unittest.cc:91: // Try different ...
7 years, 3 months ago (2013-09-11 19:00:37 UTC) #13
Dmitry Polukhin
LGTM
7 years, 3 months ago (2013-09-11 19:04:41 UTC) #14
Alexander Alekseev
jshin@ , please review ui/base/l10n/l10n_util*
7 years, 3 months ago (2013-09-12 18:00:48 UTC) #15
Dmitry Polukhin
+ tony@ for OWNER review in ui/base/l10n/
7 years, 3 months ago (2013-09-12 19:41:24 UTC) #16
Dmitry Polukhin
For multi-profile support this CL needs a bit more work. https://codereview.chromium.org/23095006/diff/57001/chrome/browser/chromeos/login/user_manager_impl.cc File chrome/browser/chromeos/login/user_manager_impl.cc (right): https://codereview.chromium.org/23095006/diff/57001/chrome/browser/chromeos/login/user_manager_impl.cc#newcode680 ...
7 years, 3 months ago (2013-09-14 15:58:46 UTC) #17
Alexander Alekseev
Added Multi Profile support. tony@, jshin@ - please review, as we need at least one ...
7 years, 3 months ago (2013-09-16 18:39:07 UTC) #18
tony
ui/base/l10n LGTM https://codereview.chromium.org/23095006/diff/74001/ui/base/l10n/l10n_util.h File ui/base/l10n/l10n_util.h (right): https://codereview.chromium.org/23095006/diff/74001/ui/base/l10n/l10n_util.h#newcode24 ui/base/l10n/l10n_util.h:24: // Returns true if succeeded. Nit: This ...
7 years, 3 months ago (2013-09-16 18:47:44 UTC) #19
Dmitry Polukhin
LGTM but please rebase and test with latest multi-profile changes before commit https://codereview.chromium.org/23095006/diff/57001/chrome/browser/chromeos/login/user_manager_impl.cc File chrome/browser/chromeos/login/user_manager_impl.cc ...
7 years, 3 months ago (2013-09-16 19:02:25 UTC) #20
jungshik at Google
LGTM 2 for the l10n part. https://codereview.chromium.org/23095006/diff/18001/chrome/browser/profiles/profile_impl.cc File chrome/browser/profiles/profile_impl.cc (right): https://codereview.chromium.org/23095006/diff/18001/chrome/browser/profiles/profile_impl.cc#newcode1078 chrome/browser/profiles/profile_impl.cc:1078: l10n_util::CheckAndResolveLocale(gplus_locale, gplus_locale_.get()); On ...
7 years, 3 months ago (2013-09-18 08:50:03 UTC) #21
Alexander Alekseev
I've probably fixed all issues. So I'll ship the latest one I get all approvals. ...
7 years, 3 months ago (2013-09-18 20:21:18 UTC) #22
Alexander Alekseev
I meant to say: - I'm going to ship the latest one as I already ...
7 years, 3 months ago (2013-09-18 20:22:22 UTC) #23
Dmitry Polukhin
LGTM but please re-run trybots
7 years, 3 months ago (2013-09-19 16:31:13 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alemate@chromium.org/23095006/99001
7 years, 3 months ago (2013-09-19 17:58:59 UTC) #25
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=78666
7 years, 3 months ago (2013-09-19 21:26:04 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alemate@chromium.org/23095006/99001
7 years, 3 months ago (2013-09-20 01:15:25 UTC) #27
commit-bot: I haz the power
Failed to apply patch for chrome/browser/chromeos/login/user_manager_impl.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 3 months ago (2013-09-20 01:15:36 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alemate@chromium.org/23095006/43001
7 years, 3 months ago (2013-09-20 08:01:43 UTC) #29
commit-bot: I haz the power
Retried try job too often on win7_aura for step(s) interactive_ui_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win7_aura&number=81092
7 years, 3 months ago (2013-09-20 10:38:27 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alemate@chromium.org/23095006/43001
7 years, 3 months ago (2013-09-20 10:55:53 UTC) #31
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) sync_integration_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=199984
7 years, 3 months ago (2013-09-20 15:15:16 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alemate@chromium.org/23095006/43001
7 years, 3 months ago (2013-09-20 17:18:47 UTC) #33
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) sync_integration_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=200269
7 years, 3 months ago (2013-09-20 21:57:53 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alemate@chromium.org/23095006/167001
7 years, 3 months ago (2013-09-23 12:37:46 UTC) #35
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) sync_integration_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=201106
7 years, 3 months ago (2013-09-23 17:45:16 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alemate@chromium.org/23095006/167001
7 years, 3 months ago (2013-09-23 18:08:17 UTC) #37
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) sync_integration_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=201258
7 years, 3 months ago (2013-09-23 22:26:12 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alemate@chromium.org/23095006/167001
7 years, 3 months ago (2013-09-23 23:28:43 UTC) #39
commit-bot: I haz the power
7 years, 3 months ago (2013-09-24 02:49:42 UTC) #40
Message was sent while issue was closed.
Change committed as 224862

Powered by Google App Engine
This is Rietveld 408576698