Fix input method reset in Managed Guest Sessions [chromium/src : main]

0 views
Skip to first unread message

Sergey Poromov (Gerrit)

unread,
Jul 11, 2026, 4:53:36 AM (11 days ago) Jul 11
to Bao-Duy Tran, Istvan Nagy, Chromium LUCI CQ, Enterprise Policy Reviews, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org
Attention needed from Bao-Duy Tran and Istvan Nagy

Sergey Poromov voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Bao-Duy Tran
  • Istvan Nagy
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2fc5307ea24cbdbf20633354da4dbe819584bcd2
Gerrit-Change-Number: 8077118
Gerrit-PatchSet: 6
Gerrit-Owner: Sergey Poromov <por...@chromium.org>
Gerrit-Reviewer: Bao-Duy Tran <tranb...@chromium.org>
Gerrit-Reviewer: Istvan Nagy <is...@google.com>
Gerrit-Reviewer: Sergey Poromov <por...@chromium.org>
Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
Gerrit-Attention: Bao-Duy Tran <tranb...@chromium.org>
Gerrit-Attention: Istvan Nagy <is...@google.com>
Gerrit-Comment-Date: Sat, 11 Jul 2026 08:53:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Istvan Nagy (Gerrit)

unread,
Jul 11, 2026, 4:17:09 PM (10 days ago) Jul 11
to Sergey Poromov, Bao-Duy Tran, Chromium LUCI CQ, Enterprise Policy Reviews, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org
Attention needed from Bao-Duy Tran and Sergey Poromov

Istvan Nagy voted and added 1 comment

Votes added by Istvan Nagy

Code-Review+1

1 comment

File chrome/browser/ash/policy/core/device_local_account_browsertest.cc
Line 2994, Patchset 6 (Latest): // Without Fix 1, this pref is not populated during InitLocaleAndInputMethodsForNewUser.
Istvan Nagy . unresolved

nit: I guess Fix 1 is the fix in the CL description. Would be better to write a comment independently from the CL description.

Open in Gerrit

Related details

Attention is currently required from:
  • Bao-Duy Tran
  • Sergey Poromov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2fc5307ea24cbdbf20633354da4dbe819584bcd2
Gerrit-Change-Number: 8077118
Gerrit-PatchSet: 6
Gerrit-Owner: Sergey Poromov <por...@chromium.org>
Gerrit-Reviewer: Bao-Duy Tran <tranb...@chromium.org>
Gerrit-Reviewer: Istvan Nagy <is...@google.com>
Gerrit-Reviewer: Sergey Poromov <por...@chromium.org>
Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
Gerrit-Attention: Bao-Duy Tran <tranb...@chromium.org>
Gerrit-Attention: Sergey Poromov <por...@chromium.org>
Gerrit-Comment-Date: Sat, 11 Jul 2026 20:16:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Sergey Poromov (Gerrit)

unread,
Jul 13, 2026, 4:21:09 AM (9 days ago) Jul 13
to Istvan Nagy, Bao-Duy Tran, Chromium LUCI CQ, Enterprise Policy Reviews, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org
Attention needed from Bao-Duy Tran

Sergey Poromov voted and added 1 comment

Votes added by Sergey Poromov

Commit-Queue+1

1 comment

File chrome/browser/ash/policy/core/device_local_account_browsertest.cc
Line 2994, Patchset 6: // Without Fix 1, this pref is not populated during InitLocaleAndInputMethodsForNewUser.
Istvan Nagy . resolved

nit: I guess Fix 1 is the fix in the CL description. Would be better to write a comment independently from the CL description.

Sergey Poromov

Oops, you are right, that's an artifact from asking AI to write the test.

Open in Gerrit

Related details

Attention is currently required from:
  • Bao-Duy Tran
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I2fc5307ea24cbdbf20633354da4dbe819584bcd2
    Gerrit-Change-Number: 8077118
    Gerrit-PatchSet: 7
    Gerrit-Owner: Sergey Poromov <por...@chromium.org>
    Gerrit-Reviewer: Bao-Duy Tran <tranb...@chromium.org>
    Gerrit-Reviewer: Istvan Nagy <is...@google.com>
    Gerrit-Reviewer: Sergey Poromov <por...@chromium.org>
    Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
    Gerrit-Attention: Bao-Duy Tran <tranb...@chromium.org>
    Gerrit-Comment-Date: Mon, 13 Jul 2026 08:20:49 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Istvan Nagy <is...@google.com>
    satisfied_requirement
    open
    diffy

    Bao-Duy Tran (Gerrit)

    unread,
    Jul 14, 2026, 1:44:00 AM (8 days ago) Jul 14
    to Sergey Poromov, Istvan Nagy, Chromium LUCI CQ, Enterprise Policy Reviews, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org
    Attention needed from Sergey Poromov

    Bao-Duy Tran added 3 comments

    File chrome/browser/ash/login/session/user_session_manager.cc
    Line 363, Patchset 7 (Latest): prefs->SetString(ash::prefs::kLanguagePreviousInputMethod,
    Bao-Duy Tran . unresolved

    why must "previous" be set here too, besides "current"? (this isn't discussed in the CL desc as to how it's related to the issue and/or contributes to the fix). It might need to be explicitly set for consistency, but in that case, should it be the old value of "current" instead by definition?

    File chrome/browser/ash/policy/core/device_local_account_browsertest.cc
    Line 2921, Patchset 7 (Latest):IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, MGS_AllowedInputMethods_PreservesActive) {
    Bao-Duy Tran . unresolved

    nit: spell it out in full (currently cryptic, and resembles DISBLED_ and friends)

    Line 2939, Patchset 7 (Latest): // Without saving this pref the input method might be overridden by policy.
    Bao-Duy Tran . unresolved

    I think it's much more worthwhile to have this comment in the prod code than here in the test. Even consider a more elaborate comment block (but less verbose than the CL desc) over there, given the subtlety but severity of the issue.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Sergey Poromov
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I2fc5307ea24cbdbf20633354da4dbe819584bcd2
      Gerrit-Change-Number: 8077118
      Gerrit-PatchSet: 7
      Gerrit-Owner: Sergey Poromov <por...@chromium.org>
      Gerrit-Reviewer: Bao-Duy Tran <tranb...@chromium.org>
      Gerrit-Reviewer: Istvan Nagy <is...@google.com>
      Gerrit-Reviewer: Sergey Poromov <por...@chromium.org>
      Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
      Gerrit-Attention: Sergey Poromov <por...@chromium.org>
      Gerrit-Comment-Date: Tue, 14 Jul 2026 05:43:35 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Sergey Poromov (Gerrit)

      unread,
      Jul 14, 2026, 8:01:08 AM (7 days ago) Jul 14
      to Istvan Nagy, Bao-Duy Tran, Chromium LUCI CQ, Enterprise Policy Reviews, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org
      Attention needed from Bao-Duy Tran and Istvan Nagy

      Sergey Poromov voted and added 3 comments

      Votes added by Sergey Poromov

      Commit-Queue+1

      3 comments

      File chrome/browser/ash/login/session/user_session_manager.cc
      Line 363, Patchset 7: prefs->SetString(ash::prefs::kLanguagePreviousInputMethod,
      Bao-Duy Tran . resolved

      why must "previous" be set here too, besides "current"? (this isn't discussed in the CL desc as to how it's related to the issue and/or contributes to the fix). It might need to be explicitly set for consistency, but in that case, should it be the old value of "current" instead by definition?

      Sergey Poromov

      Right, good finding. Even that `kLanguageCurrentInputMethod` is most likely empty, let's set to this value for consistency.

      File chrome/browser/ash/policy/core/device_local_account_browsertest.cc
      Line 2921, Patchset 7:IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, MGS_AllowedInputMethods_PreservesActive) {
      Bao-Duy Tran . resolved

      nit: spell it out in full (currently cryptic, and resembles DISBLED_ and friends)

      Sergey Poromov

      Done

      Line 2939, Patchset 7: // Without saving this pref the input method might be overridden by policy.
      Bao-Duy Tran . resolved

      I think it's much more worthwhile to have this comment in the prod code than here in the test. Even consider a more elaborate comment block (but less verbose than the CL desc) over there, given the subtlety but severity of the issue.

      Sergey Poromov

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Bao-Duy Tran
      • Istvan Nagy
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I2fc5307ea24cbdbf20633354da4dbe819584bcd2
        Gerrit-Change-Number: 8077118
        Gerrit-PatchSet: 8
        Gerrit-Owner: Sergey Poromov <por...@chromium.org>
        Gerrit-Reviewer: Bao-Duy Tran <tranb...@chromium.org>
        Gerrit-Reviewer: Istvan Nagy <is...@google.com>
        Gerrit-Reviewer: Sergey Poromov <por...@chromium.org>
        Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
        Gerrit-Attention: Bao-Duy Tran <tranb...@chromium.org>
        Gerrit-Attention: Istvan Nagy <is...@google.com>
        Gerrit-Comment-Date: Tue, 14 Jul 2026 12:00:50 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Bao-Duy Tran <tranb...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Bao-Duy Tran (Gerrit)

        unread,
        Jul 15, 2026, 1:07:59 AM (7 days ago) Jul 15
        to Sergey Poromov, Istvan Nagy, Chromium LUCI CQ, Enterprise Policy Reviews, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org
        Attention needed from Istvan Nagy and Sergey Poromov

        Bao-Duy Tran voted and added 3 comments

        Votes added by Bao-Duy Tran

        Code-Review+1

        3 comments

        File chrome/browser/ash/login/session/user_session_manager.cc
        Line 361, Patchset 8 (Latest): // Ensure that kLanguageCurrentInputMethod is explicitly populated here so that
        Bao-Duy Tran . unresolved

        nit: Add blank lines before line 361 and after line 372, to demarcate the block with attached comment.

        File chrome/browser/policy/login_policy_test_base_browsertest.cc
        Line 322, Patchset 8 (Latest):IN_PROC_BROWSER_TEST_F(LoginPolicyTestBase, ManagedGuestSession_AllowedInputMethods_PreservesActive) {
        Bao-Duy Tran . unresolved

        nit: Just to confirm, the test has been intentionally moved and thoroughly rewritten? This test passes with the fix and fails without?

        Line 332, Patchset 8 (Latest): Profile* const profile = GetProfileForActiveUser();
        auto* imm = ash::input_method::InputMethodManager::Get();
        scoped_refptr<ash::input_method::InputMethodManager::State> ime_state =
        imm->GetActiveIMEState();
        Bao-Duy Tran . unresolved

        nit: Move these closer to, or inline them where each of them is used.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Istvan Nagy
        • Sergey Poromov
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I2fc5307ea24cbdbf20633354da4dbe819584bcd2
          Gerrit-Change-Number: 8077118
          Gerrit-PatchSet: 8
          Gerrit-Owner: Sergey Poromov <por...@chromium.org>
          Gerrit-Reviewer: Bao-Duy Tran <tranb...@chromium.org>
          Gerrit-Reviewer: Istvan Nagy <is...@google.com>
          Gerrit-Reviewer: Sergey Poromov <por...@chromium.org>
          Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
          Gerrit-Attention: Sergey Poromov <por...@chromium.org>
          Gerrit-Attention: Istvan Nagy <is...@google.com>
          Gerrit-Comment-Date: Wed, 15 Jul 2026 05:07:25 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Sergey Poromov (Gerrit)

          unread,
          Jul 15, 2026, 5:32:51 PM (6 days ago) Jul 15
          to Bao-Duy Tran, Istvan Nagy, Chromium LUCI CQ, Enterprise Policy Reviews, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org
          Attention needed from Bao-Duy Tran and Istvan Nagy

          Sergey Poromov added 3 comments

          File chrome/browser/ash/login/session/user_session_manager.cc
          Line 361, Patchset 8: // Ensure that kLanguageCurrentInputMethod is explicitly populated here so that
          Bao-Duy Tran . resolved

          nit: Add blank lines before line 361 and after line 372, to demarcate the block with attached comment.

          Sergey Poromov

          Done

          File chrome/browser/policy/login_policy_test_base_browsertest.cc
          Line 322, Patchset 8:IN_PROC_BROWSER_TEST_F(LoginPolicyTestBase, ManagedGuestSession_AllowedInputMethods_PreservesActive) {
          Bao-Duy Tran . resolved

          nit: Just to confirm, the test has been intentionally moved and thoroughly rewritten? This test passes with the fix and fails without?

          Sergey Poromov

          Oops, no, I mistakenly applied rename it on top of Patchset 3...

          Line 332, Patchset 8: Profile* const profile = GetProfileForActiveUser();

          auto* imm = ash::input_method::InputMethodManager::Get();
          scoped_refptr<ash::input_method::InputMethodManager::State> ime_state =
          imm->GetActiveIMEState();
          Bao-Duy Tran . resolved

          nit: Move these closer to, or inline them where each of them is used.

          Sergey Poromov

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Bao-Duy Tran
          • Istvan Nagy
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I2fc5307ea24cbdbf20633354da4dbe819584bcd2
            Gerrit-Change-Number: 8077118
            Gerrit-PatchSet: 10
            Gerrit-Owner: Sergey Poromov <por...@chromium.org>
            Gerrit-Reviewer: Bao-Duy Tran <tranb...@chromium.org>
            Gerrit-Reviewer: Istvan Nagy <is...@google.com>
            Gerrit-Reviewer: Sergey Poromov <por...@chromium.org>
            Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
            Gerrit-Attention: Bao-Duy Tran <tranb...@chromium.org>
            Gerrit-Attention: Istvan Nagy <is...@google.com>
            Gerrit-Comment-Date: Wed, 15 Jul 2026 21:32:31 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Bao-Duy Tran <tranb...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Bao-Duy Tran (Gerrit)

            unread,
            Jul 16, 2026, 4:32:10 AM (6 days ago) Jul 16
            to Sergey Poromov, Istvan Nagy, Chromium LUCI CQ, Enterprise Policy Reviews, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org
            Attention needed from Istvan Nagy and Sergey Poromov

            Bao-Duy Tran added 1 comment

            File chrome/browser/ash/policy/core/device_local_account_browsertest.cc
            Line 2942, Patchset 10 (Latest): prefs->GetString(ash::prefs::kLanguagePreviousInputMethod));
            Bao-Duy Tran . unresolved

            tweak test case so this "previous" can be different from "current", thus more specifically tested?

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Istvan Nagy
            • Sergey Poromov
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement satisfiedCode-Owners
              • requirement is not satisfiedCode-Review
              • requirement is not satisfiedNo-Unresolved-Comments
              • requirement is not satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I2fc5307ea24cbdbf20633354da4dbe819584bcd2
              Gerrit-Change-Number: 8077118
              Gerrit-PatchSet: 10
              Gerrit-Owner: Sergey Poromov <por...@chromium.org>
              Gerrit-Reviewer: Bao-Duy Tran <tranb...@chromium.org>
              Gerrit-Reviewer: Istvan Nagy <is...@google.com>
              Gerrit-Reviewer: Sergey Poromov <por...@chromium.org>
              Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
              Gerrit-Attention: Sergey Poromov <por...@chromium.org>
              Gerrit-Attention: Istvan Nagy <is...@google.com>
              Gerrit-Comment-Date: Thu, 16 Jul 2026 08:31:42 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Sergey Poromov (Gerrit)

              unread,
              Jul 17, 2026, 11:06:53 AM (4 days ago) Jul 17
              to Bao-Duy Tran, Istvan Nagy, Chromium LUCI CQ, Enterprise Policy Reviews, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org
              Attention needed from Bao-Duy Tran and Istvan Nagy

              Sergey Poromov voted and added 1 comment

              Votes added by Sergey Poromov

              Commit-Queue+1

              1 comment

              File chrome/browser/ash/policy/core/device_local_account_browsertest.cc
              Line 2942, Patchset 10: prefs->GetString(ash::prefs::kLanguagePreviousInputMethod));
              Bao-Duy Tran . resolved

              tweak test case so this "previous" can be different from "current", thus more specifically tested?

              Sergey Poromov

              Done. Also I found that it's better to set `kLanguageCurrentInputMethod` before `kLanguagePreloadEngines` that could potentially asynchronously write it too.

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Bao-Duy Tran
              • Istvan Nagy
              Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement satisfiedCode-Owners
                • requirement is not satisfiedCode-Review
                • requirement is not satisfiedReview-Enforcement
                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                Gerrit-MessageType: comment
                Gerrit-Project: chromium/src
                Gerrit-Branch: main
                Gerrit-Change-Id: I2fc5307ea24cbdbf20633354da4dbe819584bcd2
                Gerrit-Change-Number: 8077118
                Gerrit-PatchSet: 12
                Gerrit-Owner: Sergey Poromov <por...@chromium.org>
                Gerrit-Reviewer: Bao-Duy Tran <tranb...@chromium.org>
                Gerrit-Reviewer: Istvan Nagy <is...@google.com>
                Gerrit-Reviewer: Sergey Poromov <por...@chromium.org>
                Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
                Gerrit-Attention: Bao-Duy Tran <tranb...@chromium.org>
                Gerrit-Attention: Istvan Nagy <is...@google.com>
                Gerrit-Comment-Date: Fri, 17 Jul 2026 15:06:34 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                Comment-In-Reply-To: Bao-Duy Tran <tranb...@chromium.org>
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Bao-Duy Tran (Gerrit)

                unread,
                Jul 20, 2026, 1:47:28 AM (yesterday) Jul 20
                to Sergey Poromov, Istvan Nagy, Chromium LUCI CQ, Enterprise Policy Reviews, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org
                Attention needed from Istvan Nagy and Sergey Poromov

                Bao-Duy Tran added 2 comments

                File chrome/browser/ash/login/session/user_session_manager.cc
                Line 365, Patchset 15 (Latest): manager->GetInputMethodUtil()->GetMigratedInputMethod(
                Bao-Duy Tran . unresolved

                Is this required? Same preferred_input_method is used directly elsewhere in this method? The "migrated" conversion is just meant for some [legacy IDs from VPD](https://source.chromium.org/chromium/chromium/src/+/main:ui/base/ime/ash/input_method_util.cc;l=81;drc=d3fbdffe8a999ab6afdfb2ad6d1edb188f7c3582)?

                Line 374, Patchset 15 (Latest): scoped_refptr<input_method::InputMethodManager::State> ime_state =
                session_manager->GetDefaultIMEState(profile);
                ime_state->EnableInputMethod(migrated_preferred_input_method_id);
                ime_state->ChangeInputMethod(migrated_preferred_input_method_id,
                false /* show_message */);
                Bao-Duy Tran . unresolved

                why are these now needed? They haven't been discussed in the CL desc or anywhere so far?

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Istvan Nagy
                • Sergey Poromov
                Submit Requirements:
                  • requirement satisfiedCode-Coverage
                  • requirement satisfiedCode-Owners
                  • requirement is not satisfiedCode-Review
                  • requirement is not satisfiedNo-Unresolved-Comments
                  • requirement is not satisfiedReview-Enforcement
                  Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                  Gerrit-MessageType: comment
                  Gerrit-Project: chromium/src
                  Gerrit-Branch: main
                  Gerrit-Change-Id: I2fc5307ea24cbdbf20633354da4dbe819584bcd2
                  Gerrit-Change-Number: 8077118
                  Gerrit-PatchSet: 15
                  Gerrit-Owner: Sergey Poromov <por...@chromium.org>
                  Gerrit-Reviewer: Bao-Duy Tran <tranb...@chromium.org>
                  Gerrit-Reviewer: Istvan Nagy <is...@google.com>
                  Gerrit-Reviewer: Sergey Poromov <por...@chromium.org>
                  Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
                  Gerrit-Attention: Sergey Poromov <por...@chromium.org>
                  Gerrit-Attention: Istvan Nagy <is...@google.com>
                  Gerrit-Comment-Date: Mon, 20 Jul 2026 05:47:05 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Sergey Poromov (Gerrit)

                  unread,
                  Jul 20, 2026, 11:44:58 AM (yesterday) Jul 20
                  to Bao-Duy Tran, Istvan Nagy, Chromium LUCI CQ, Enterprise Policy Reviews, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org
                  Attention needed from Bao-Duy Tran and Istvan Nagy

                  Sergey Poromov added 2 comments

                  File chrome/browser/ash/login/session/user_session_manager.cc
                  Line 365, Patchset 15: manager->GetInputMethodUtil()->GetMigratedInputMethod(
                  Bao-Duy Tran . resolved

                  Is this required? Same preferred_input_method is used directly elsewhere in this method? The "migrated" conversion is just meant for some [legacy IDs from VPD](https://source.chromium.org/chromium/chromium/src/+/main:ui/base/ime/ash/input_method_util.cc;l=81;drc=d3fbdffe8a999ab6afdfb2ad6d1edb188f7c3582)?

                  Sergey Poromov

                  My mistake, replied below.

                  Line 374, Patchset 15: scoped_refptr<input_method::InputMethodManager::State> ime_state =

                  session_manager->GetDefaultIMEState(profile);
                  ime_state->EnableInputMethod(migrated_preferred_input_method_id);
                  ime_state->ChangeInputMethod(migrated_preferred_input_method_id,
                  false /* show_message */);
                  Bao-Duy Tran . resolved

                  why are these now needed? They haven't been discussed in the CL desc or anywhere so far?

                  Sergey Poromov

                  Sorry for disturbance - the updated CL on Friday (patchset 12) unexpectedly failed the test and when I asked AI to try to fix it over the weekend, it updated this part too, for some reason. I removed you from attention set, but should've moved the CL to WIP (or notify as not ready for review yet) until I'll manually test and fix the CL on Monday.

                  I confirmed that the change made here is correct and seems that the tests now work (so, only test had to be updated).

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Bao-Duy Tran
                  • Istvan Nagy
                  Submit Requirements:
                    • requirement satisfiedCode-Coverage
                    • requirement satisfiedCode-Owners
                    • requirement is not satisfiedCode-Review
                    • requirement is not satisfiedReview-Enforcement
                    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                    Gerrit-MessageType: comment
                    Gerrit-Project: chromium/src
                    Gerrit-Branch: main
                    Gerrit-Change-Id: I2fc5307ea24cbdbf20633354da4dbe819584bcd2
                    Gerrit-Change-Number: 8077118
                    Gerrit-PatchSet: 17
                    Gerrit-Owner: Sergey Poromov <por...@chromium.org>
                    Gerrit-Reviewer: Bao-Duy Tran <tranb...@chromium.org>
                    Gerrit-Reviewer: Istvan Nagy <is...@google.com>
                    Gerrit-Reviewer: Sergey Poromov <por...@chromium.org>
                    Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
                    Gerrit-Attention: Bao-Duy Tran <tranb...@chromium.org>
                    Gerrit-Attention: Istvan Nagy <is...@google.com>
                    Gerrit-Comment-Date: Mon, 20 Jul 2026 15:44:37 +0000
                    Gerrit-HasComments: Yes
                    Gerrit-Has-Labels: No
                    Comment-In-Reply-To: Bao-Duy Tran <tranb...@chromium.org>
                    satisfied_requirement
                    unsatisfied_requirement
                    open
                    diffy

                    Bao-Duy Tran (Gerrit)

                    unread,
                    1:53 AM (17 hours ago) 1:53 AM
                    to Sergey Poromov, Istvan Nagy, Chromium LUCI CQ, Enterprise Policy Reviews, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org
                    Attention needed from Istvan Nagy and Sergey Poromov

                    Bao-Duy Tran voted Code-Review+1

                    Code-Review+1
                    Open in Gerrit

                    Related details

                    Attention is currently required from:
                    • Istvan Nagy
                    • Sergey Poromov
                    Submit Requirements:
                      • requirement satisfiedCode-Coverage
                      • requirement satisfiedCode-Owners
                      • requirement satisfiedCode-Review
                      • requirement satisfiedReview-Enforcement
                      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                      Gerrit-MessageType: comment
                      Gerrit-Project: chromium/src
                      Gerrit-Branch: main
                      Gerrit-Change-Id: I2fc5307ea24cbdbf20633354da4dbe819584bcd2
                      Gerrit-Change-Number: 8077118
                      Gerrit-PatchSet: 17
                      Gerrit-Owner: Sergey Poromov <por...@chromium.org>
                      Gerrit-Reviewer: Bao-Duy Tran <tranb...@chromium.org>
                      Gerrit-Reviewer: Istvan Nagy <is...@google.com>
                      Gerrit-Reviewer: Sergey Poromov <por...@chromium.org>
                      Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
                      Gerrit-Attention: Sergey Poromov <por...@chromium.org>
                      Gerrit-Attention: Istvan Nagy <is...@google.com>
                      Gerrit-Comment-Date: Tue, 21 Jul 2026 05:53:13 +0000
                      Gerrit-HasComments: No
                      Gerrit-Has-Labels: Yes
                      satisfied_requirement
                      open
                      diffy

                      Sergey Poromov (Gerrit)

                      unread,
                      6:51 AM (12 hours ago) 6:51 AM
                      to Bao-Duy Tran, Istvan Nagy, Chromium LUCI CQ, Enterprise Policy Reviews, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org
                      Attention needed from Istvan Nagy

                      Sergey Poromov voted and added 1 comment

                      Votes added by Sergey Poromov

                      Commit-Queue+2

                      1 comment

                      Patchset-level comments
                      File-level comment, Patchset 17 (Latest):
                      Sergey Poromov . resolved

                      Thanks for the review and all suggestions, Bao-Duy!

                      Open in Gerrit

                      Related details

                      Attention is currently required from:
                      • Istvan Nagy
                      Submit Requirements:
                      • requirement satisfiedCode-Coverage
                      • requirement satisfiedCode-Owners
                      • requirement satisfiedCode-Review
                      • requirement satisfiedReview-Enforcement
                      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                      Gerrit-MessageType: comment
                      Gerrit-Project: chromium/src
                      Gerrit-Branch: main
                      Gerrit-Change-Id: I2fc5307ea24cbdbf20633354da4dbe819584bcd2
                      Gerrit-Change-Number: 8077118
                      Gerrit-PatchSet: 17
                      Gerrit-Owner: Sergey Poromov <por...@chromium.org>
                      Gerrit-Reviewer: Bao-Duy Tran <tranb...@chromium.org>
                      Gerrit-Reviewer: Istvan Nagy <is...@google.com>
                      Gerrit-Reviewer: Sergey Poromov <por...@chromium.org>
                      Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
                      Gerrit-Attention: Istvan Nagy <is...@google.com>
                      Gerrit-Comment-Date: Tue, 21 Jul 2026 10:51:19 +0000
                      Gerrit-HasComments: Yes
                      Gerrit-Has-Labels: Yes
                      satisfied_requirement
                      open
                      diffy

                      Chromium LUCI CQ (Gerrit)

                      unread,
                      6:55 AM (12 hours ago) 6:55 AM
                      to Sergey Poromov, Bao-Duy Tran, Istvan Nagy, Enterprise Policy Reviews, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, rrsilva+wat...@google.com, tbarzi...@chromium.org

                      Chromium LUCI CQ submitted the change

                      Change information

                      Commit message:
                      Fix input method reset in Managed Guest Sessions

                      When launching a Managed Guest Session (MGS), the user's chosen keyboard
                      layout on the login screen was being lost. This occurred due to a race
                      condition between the asynchronous Ozone layout switch and the
                      synchronous application of device policies:

                      1. UserSessionManager initiates an Ozone keyboard layout switch, which
                      happens asynchronously over Mojo IPC.

                      2. The MGS user profile initializes and synchronously applies the cached
                      `AllowedInputMethods` device policy via `Preferences::Init()`.

                      3. Because the Ozone layout change hasn't been completed yet,
                      `kLanguageCurrentInputMethod` is still temporarily empty.

                      4. `Preferences::SetInputMethodList` sees the empty layout preference
                      and aggressively falls back to the first layout in the allowed policy
                      list, discarding the user's login screen choice.

                      This CL fixes the issue by proactively persisting
                      `kLanguageCurrentInputMethod` directly inside
                      `InitLocaleAndInputMethodsForNewUser`. This ensures the user's chosen
                      layout is solidly populated in the preferences before the policy filter
                      is applied, successfully preserving the selection.
                      Fixed: 507818919
                      Test: Tested locally without/with fix + new browsertest
                      Change-Id: I2fc5307ea24cbdbf20633354da4dbe819584bcd2
                      Bug: 507818919
                      Reviewed-by: Bao-Duy Tran <tranb...@chromium.org>
                      Commit-Queue: Sergey Poromov <por...@chromium.org>
                      Cr-Commit-Position: refs/heads/main@{#1665361}
                      Files:
                      • M chrome/browser/ash/login/session/user_session_manager.cc
                      • M chrome/browser/ash/policy/core/device_local_account_browsertest.cc
                      Change size: M
                      Delta: 2 files changed, 52 insertions(+), 0 deletions(-)
                      Branch: refs/heads/main
                      Submit Requirements:
                      • requirement satisfiedCode-Review: +1 by Bao-Duy Tran
                      Open in Gerrit
                      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                      Gerrit-MessageType: merged
                      Gerrit-Project: chromium/src
                      Gerrit-Branch: main
                      Gerrit-Change-Id: I2fc5307ea24cbdbf20633354da4dbe819584bcd2
                      Gerrit-Change-Number: 8077118
                      Gerrit-PatchSet: 18
                      Gerrit-Owner: Sergey Poromov <por...@chromium.org>
                      Gerrit-Reviewer: Bao-Duy Tran <tranb...@chromium.org>
                      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
                      Gerrit-Reviewer: Istvan Nagy <is...@google.com>
                      Gerrit-Reviewer: Sergey Poromov <por...@chromium.org>
                      open
                      diffy
                      satisfied_requirement
                      Reply all
                      Reply to author
                      Forward
                      0 new messages