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

Issue 2652793003: Add login screen locale and input method device policies (Closed)

Created:
3 years, 11 months ago by pmarko
Modified:
3 years, 10 months ago
CC:
chromium-reviews, alemate+watch_chromium.org, sadrul, yusukes+watch_chromium.org, achuith+watch_chromium.org, shuchen+watch_chromium.org, asvitkine+watch_chromium.org, nona+watch_chromium.org, oshima+watch_chromium.org, kalyank, tnagel+watch_chromium.org, James Su, davemoore+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add login screen locale and input method device policies This CL introduces two device policies for Chrome OS: + DeviceLoginScreenLocales Mandates a specific locale for the login screen. (Note that the policy value is a list for future compatibility, in case dynamically switching login screen locales is implemented in the future. Currently only the first value is used). + DeviceLoginScreenInputMethods Enforces input methods on the login screen. This is done by: Locale: - Introducing cros setting kDeviceLoginScreenLocales, controlled by the new policy - Applying Login Screen locale before login screen is displayed - Pre-setting kApplicationLocale on application exit for the next run Input Methods: - Introducing cros setting kDeviceLoginScreenInputMethods, controlled by the new policy - new method SetAllowedKeyboardLayoutInputMethods on InputMethodManager to restrict input methods - enforcing keyboard layouts (through InputMethodManager) on sign-in screen (depending on which user's fod is focused) - adding info to the tray icon to display that input methods are controlled by policy See go/cros-locale-input-policy-dd for more detail. BUG=373324 TEST=New browser_tests, new unit_tests, manual test with YAPS. Review-Url: https://codereview.chromium.org/2652793003 Cr-Commit-Position: refs/heads/master@{#448961} Committed: https://chromium.googlesource.com/chromium/src/+/8c3ffb5e698796da543bcbf2192bbb5aebb90807

Patch Set 1 #

Patch Set 2 : Cleanup, display IME Tray even for a single IME when managed. #

Total comments: 14

Patch Set 3 : Cleanup variable names #

Total comments: 4

Patch Set 4 : Addressed comments. #

Total comments: 4

Patch Set 5 : Addressed comments. #

Total comments: 9

Patch Set 6 : Addressed comments: Renamed methods. #

Patch Set 7 : Refactor setting kApplicationLocale in application_lifetime.cc #

Patch Set 8 : Rebase. #

Total comments: 8

Patch Set 9 : Addressed comments. #

Total comments: 2

Patch Set 10 : Addressed comments. #

Patch Set 11 : Rebase. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+734 lines, -88 lines) Patch
M ash/common/system/ime/tray_ime_chromeos.h View 1 3 chunks +14 lines, -0 lines 0 comments Download
M ash/common/system/ime/tray_ime_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 11 chunks +51 lines, -9 lines 0 comments Download
M ash/common/system/ime/tray_ime_chromeos_unittest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +22 lines, -0 lines 0 comments Download
M ash/common/system/tray/system_tray_delegate.h View 1 chunk +3 lines, -0 lines 0 comments Download
M ash/common/system/tray/system_tray_delegate.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/input_method/input_method_manager_impl.h View 1 2 3 4 5 3 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/input_method/input_method_manager_impl.cc View 1 2 3 4 5 6 7 8 5 chunks +64 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc View 1 2 3 4 5 2 chunks +92 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/login_screen_policy_browsertest.cc View 1 2 3 4 5 2 chunks +92 lines, -9 lines 0 comments Download
M chrome/browser/chromeos/login/ui/login_display_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +90 lines, -34 lines 0 comments Download
M chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc View 1 2 3 3 chunks +50 lines, -27 lines 0 comments Download
M chrome/browser/chromeos/policy/proto/chrome_device_policy.proto View 2 chunks +12 lines, -0 lines 4 comments Download
M chrome/browser/chromeos/settings/device_settings_provider.cc View 1 2 3 2 chunks +22 lines, -0 lines 0 comments Download
M chrome/browser/lifetime/application_lifetime.cc View 1 2 3 4 5 6 7 8 9 3 chunks +32 lines, -6 lines 0 comments Download
M chrome/browser/ui/ash/system_tray_delegate_chromeos.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/ash/system_tray_delegate_chromeos.cc View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h View 1 2 3 4 5 6 7 4 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc View 1 2 3 4 5 6 7 8 8 chunks +60 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/signin/user_manager_screen_handler.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/policy/policy_test_cases.json View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
M chromeos/settings/cros_settings_names.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chromeos/settings/cros_settings_names.cc View 1 1 chunk +9 lines, -0 lines 0 comments Download
M components/policy/resources/policy_templates.json View 1 2 3 4 5 6 7 8 9 10 2 chunks +43 lines, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M ui/base/ime/chromeos/input_method_manager.h View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download
M ui/base/ime/chromeos/mock_input_method_manager.h View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download
M ui/base/ime/chromeos/mock_input_method_manager.cc View 1 2 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download
M ui/login/account_picker/user_pod_row.js View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (11 generated)
pmarko
xiyuan@chromium.org: Please review the following changes: ui/login/account_picker/user_pod_row.js chrome/browser/ui/webui/* Enforcing keyboard layouts depending on focused user ...
3 years, 11 months ago (2017-01-25 14:12:18 UTC) #4
pastarmovj
mostly nits from my side. https://codereview.chromium.org/2652793003/diff/20001/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc File chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc (right): https://codereview.chromium.org/2652793003/diff/20001/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc#newcode857 chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc:857: if (policy.has_login_screen_locales()) { Hmm ...
3 years, 11 months ago (2017-01-25 15:42:21 UTC) #5
Mr4D (OOO till 08-26)
ash/common/system lgtm
3 years, 11 months ago (2017-01-25 17:31:54 UTC) #6
xiyuan
https://codereview.chromium.org/2652793003/diff/20001/chrome/browser/chromeos/login/login_screen_policy_browsertest.cc File chrome/browser/chromeos/login/login_screen_policy_browsertest.cc (right): https://codereview.chromium.org/2652793003/diff/20001/chrome/browser/chromeos/login/login_screen_policy_browsertest.cc#newcode118 chrome/browser/chromeos/login/login_screen_policy_browsertest.cc:118: ResourceBundle::CleanupSharedInstance(); Is this necessary? If so, could we comment ...
3 years, 11 months ago (2017-01-25 19:24:15 UTC) #7
Peter Kasting
c/b/ui/ash/ LGTM https://codereview.chromium.org/2652793003/diff/40001/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc File chrome/browser/ui/ash/system_tray_delegate_chromeos.cc (right): https://codereview.chromium.org/2652793003/diff/40001/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc#newcode489 chrome/browser/ui/ash/system_tray_delegate_chromeos.cc:489: return l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY); Nit: Shorter, and avoids else ...
3 years, 11 months ago (2017-01-25 22:09:30 UTC) #8
pmarko
Thank you for your comments, PTAL. https://codereview.chromium.org/2652793003/diff/20001/chrome/browser/chromeos/login/login_screen_policy_browsertest.cc File chrome/browser/chromeos/login/login_screen_policy_browsertest.cc (right): https://codereview.chromium.org/2652793003/diff/20001/chrome/browser/chromeos/login/login_screen_policy_browsertest.cc#newcode118 chrome/browser/chromeos/login/login_screen_policy_browsertest.cc:118: ResourceBundle::CleanupSharedInstance(); On 2017/01/25 ...
3 years, 11 months ago (2017-01-26 12:32:58 UTC) #9
xiyuan
lgtm
3 years, 11 months ago (2017-01-26 16:09:44 UTC) #10
pastarmovj
Some more nits but nothing to prevent me from issuing an lgtm concerning the policy ...
3 years, 11 months ago (2017-01-26 20:13:16 UTC) #11
pmarko
Julian: PTAL https://codereview.chromium.org/2652793003/diff/60001/components/policy/resources/policy_templates.json File components/policy/resources/policy_templates.json (right): https://codereview.chromium.org/2652793003/diff/60001/components/policy/resources/policy_templates.json#newcode9468 components/policy/resources/policy_templates.json:9468: 'desc': '''Configures the locale which is enforced ...
3 years, 10 months ago (2017-01-27 08:52:19 UTC) #12
pmarko
@xiyuan: BTW, just to double-check, have you taken a look at chrome/browser/chromeos/login/ui/login_display_host_impl.cc ? I have ...
3 years, 10 months ago (2017-01-27 08:57:13 UTC) #13
xiyuan
On 2017/01/27 08:57:13, pmarko wrote: > @xiyuan: BTW, just to double-check, have you taken a ...
3 years, 10 months ago (2017-01-27 15:38:05 UTC) #14
haraken
tools/metrics/histograms/* LGTM
3 years, 10 months ago (2017-01-27 17:58:44 UTC) #15
pmarko
@xiyuan: Thanks, just wanted to double-check. @Yuki: Would you mind reviewing ui/base/ime as Shu Chen ...
3 years, 10 months ago (2017-01-31 13:52:11 UTC) #17
Yuki
ui/base/ime/ LGTM with nits. https://codereview.chromium.org/2652793003/diff/80001/ui/base/ime/chromeos/input_method_manager.h File ui/base/ime/chromeos/input_method_manager.h (right): https://codereview.chromium.org/2652793003/diff/80001/ui/base/ime/chromeos/input_method_manager.h#newcode221 ui/base/ime/chromeos/input_method_manager.h:221: virtual bool SetAllowedKeyboardLayoutInputMethods( nit: "keyboard ...
3 years, 10 months ago (2017-01-31 15:18:30 UTC) #18
pmarko
https://codereview.chromium.org/2652793003/diff/80001/ui/base/ime/chromeos/input_method_manager.h File ui/base/ime/chromeos/input_method_manager.h (right): https://codereview.chromium.org/2652793003/diff/80001/ui/base/ime/chromeos/input_method_manager.h#newcode221 ui/base/ime/chromeos/input_method_manager.h:221: virtual bool SetAllowedKeyboardLayoutInputMethods( On 2017/01/31 15:18:29, Yuki wrote: > ...
3 years, 10 months ago (2017-02-01 10:04:12 UTC) #19
Yuki
https://codereview.chromium.org/2652793003/diff/80001/ui/base/ime/chromeos/input_method_manager.h File ui/base/ime/chromeos/input_method_manager.h (right): https://codereview.chromium.org/2652793003/diff/80001/ui/base/ime/chromeos/input_method_manager.h#newcode221 ui/base/ime/chromeos/input_method_manager.h:221: virtual bool SetAllowedKeyboardLayoutInputMethods( On 2017/02/01 10:04:12, pmarko wrote: > ...
3 years, 10 months ago (2017-02-01 12:12:20 UTC) #20
pmarko
https://codereview.chromium.org/2652793003/diff/80001/ui/base/ime/chromeos/input_method_manager.h File ui/base/ime/chromeos/input_method_manager.h (right): https://codereview.chromium.org/2652793003/diff/80001/ui/base/ime/chromeos/input_method_manager.h#newcode221 ui/base/ime/chromeos/input_method_manager.h:221: virtual bool SetAllowedKeyboardLayoutInputMethods( On 2017/02/01 12:12:19, Yuki wrote: > ...
3 years, 10 months ago (2017-02-01 14:07:57 UTC) #21
Shu Chen
https://codereview.chromium.org/2652793003/diff/140001/chrome/browser/chromeos/input_method/input_method_manager_impl.cc File chrome/browser/chromeos/input_method/input_method_manager_impl.cc (right): https://codereview.chromium.org/2652793003/diff/140001/chrome/browser/chromeos/input_method/input_method_manager_impl.cc#newcode283 chrome/browser/chromeos/input_method/input_method_manager_impl.cc:283: IsInputMethodAllowed(candidate)) nit: add brackets {} for the following line. ...
3 years, 10 months ago (2017-02-07 02:47:09 UTC) #24
pmarko
Thank you for taking the time to review this CL after your vacation! Please see ...
3 years, 10 months ago (2017-02-07 10:44:10 UTC) #25
Shu Chen
On 2017/02/07 10:44:10, pmarko wrote: > Thank you for taking the time to review this ...
3 years, 10 months ago (2017-02-07 13:33:41 UTC) #26
Nico
application_lifetime lgtm https://codereview.chromium.org/2652793003/diff/160001/chrome/browser/lifetime/application_lifetime.cc File chrome/browser/lifetime/application_lifetime.cc (right): https://codereview.chromium.org/2652793003/diff/160001/chrome/browser/lifetime/application_lifetime.cc#newcode116 chrome/browser/lifetime/application_lifetime.cc:116: #endif this does #if cros #endif #if ...
3 years, 10 months ago (2017-02-07 15:14:22 UTC) #27
pmarko
https://codereview.chromium.org/2652793003/diff/160001/chrome/browser/lifetime/application_lifetime.cc File chrome/browser/lifetime/application_lifetime.cc (right): https://codereview.chromium.org/2652793003/diff/160001/chrome/browser/lifetime/application_lifetime.cc#newcode116 chrome/browser/lifetime/application_lifetime.cc:116: #endif On 2017/02/07 15:14:22, Nico wrote: > this does ...
3 years, 10 months ago (2017-02-08 07:02:03 UTC) #28
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/2652793003/200001
3 years, 10 months ago (2017-02-08 11:04:55 UTC) #31
commit-bot: I haz the power
Committed patchset #11 (id:200001) as https://chromium.googlesource.com/chromium/src/+/8c3ffb5e698796da543bcbf2192bbb5aebb90807
3 years, 10 months ago (2017-02-08 12:19:25 UTC) #34
Thiemo Nagel
https://codereview.chromium.org/2652793003/diff/200001/chrome/browser/chromeos/policy/proto/chrome_device_policy.proto File chrome/browser/chromeos/policy/proto/chrome_device_policy.proto (right): https://codereview.chromium.org/2652793003/diff/200001/chrome/browser/chromeos/policy/proto/chrome_device_policy.proto#newcode757 chrome/browser/chromeos/policy/proto/chrome_device_policy.proto:757: // A list of allowed locales on the login ...
3 years, 10 months ago (2017-02-13 11:33:20 UTC) #36
pmarko
3 years, 10 months ago (2017-02-13 17:50:31 UTC) #37
Message was sent while issue was closed.
https://codereview.chromium.org/2652793003/diff/200001/chrome/browser/chromeo...
File chrome/browser/chromeos/policy/proto/chrome_device_policy.proto (right):

https://codereview.chromium.org/2652793003/diff/200001/chrome/browser/chromeo...
chrome/browser/chromeos/policy/proto/chrome_device_policy.proto:757: // A list
of allowed locales on the login page.
On 2017/02/13 11:33:20, Thiemo Nagel (slow) wrote:
> Nit: login screen

You're right. Mini-CL to correct this:
https://codereview.chromium.org/2694833002 .

https://codereview.chromium.org/2652793003/diff/200001/chrome/browser/chromeo...
chrome/browser/chromeos/policy/proto/chrome_device_policy.proto:762: // A list
of allowed input methods on the login page.
On 2017/02/13 11:33:20, Thiemo Nagel (slow) wrote:
> Nit: login screen
See above.

Powered by Google App Engine
This is Rietveld 408576698