[iOS] Throttle keyboardWillShow refreshes [chromium/src : main]

0 views
Skip to first unread message

Leo Zhao (Gerrit)

unread,
Dec 19, 2025, 3:17:17 PM12/19/25
to Chromium Metrics Reviews, AyeAye, Tommy Martino, Vincent Boisselle, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, browser-comp...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, tmartino+tran...@chromium.org
Attention needed from Vincent Boisselle

Leo Zhao added 11 comments

Commit Message
Line 7, Patchset 10:[iOS] flags for the experiment on keyboardWillShow triggered suggestion refreshes
Vincent Boisselle . resolved

I would focus on the feature for the title:


"Throttle keyboardWillShow refreshes"

Leo Zhao

👍

File ios/chrome/browser/autofill/model/features.h
Line 27, Patchset 10:BASE_DECLARE_FEATURE(kAutofillKeyboardWillShowSuggestionRefreshOptional);
Vincent Boisselle . resolved

I think we could shorten this:

kAutofillThrottleOptionalSuggestionRefresh

Leo Zhao

Updated.

File ios/chrome/browser/autofill/ui_bundled/form_input_accessory/form_input_accessory_mediator.mm
Line 1008, Patchset 10:// 2. avoid triggering a -retrieveSuggestions call with staled data just before
// -webState:didRegisterFormActivity:inFrame:.
Vincent Boisselle . resolved

not sure we prevent that, because the cooldown starts after the activity

but yes, there is throttling in place to avoid over doing it, which could be the case with stale data

Leo Zhao

This is the result of the delay. When a field is focused, `keyboardWillShow` arrives first. -webState:didRegisterFormActivity:inFrame: immediately after that. The delay schedules the update, which then is cancelled by the subsequent -webState:didRegisterFormActivity:inFrame: call.

File ios/chrome/browser/autofill/ui_bundled/form_input_accessory/form_input_accessory_mediator_unittest.mm
Line 47, Patchset 10:// both.
Vincent Boisselle . resolved

put in comment the sum of the 2 delays

an alternative is to add the constants in the .h so they can be reused here I think you can sum 2 constexpr + a buffer, up to you

Leo Zhao

I have added the constants in the +testing.h file. This value is not used for measure anything timing. As long as it is bigger than the longest one, which is the cooldown period. I am using 2x cooldown.

Line 48, Patchset 10:constexpr base::TimeDelta kKeyboardWillShowFastForwardSeconds =
Vincent Boisselle . resolved

`kDelayForAcceptingOptionalUpdates`

Leo Zhao

Updated.

Line 62, Patchset 10:void PostKeyboardWillShowNotification(int count = 1) {
Vincent Boisselle . resolved

add `s`

Leo Zhao

I added a s to the end, PostKeyboardWillShowNotification(s).

Line 64, Patchset 10: [[NSNotificationCenter defaultCenter]
Vincent Boisselle . resolved

we could fast forward the clock between each

Leo Zhao

This is used to post consecutive keyboard notifications. If a fast forward is needed, I use PostKeyboardWillShowNotifications(1) and then fast forward.

Line 463, Patchset 10:// testing. Otherwise, suggestion refresh requests may be blocked due to app
// state being inactive while running unit tests.
Vincent Boisselle . resolved

how does it happen ?

Leo Zhao

updateSuggestionsIfNeeded calls IsSuggestionRefreshAllowed. IsSuggestionRefreshAllowed checks app state when this feature is enabled, and blocks refreshes if the app is inactive. This is not happening for unit testings, so I am removing it.

Line 470, Patchset 10: {}, {kSuppressKeyboardWillShowSuggestionRefresh,
Vincent Boisselle . resolved

add `/*enabled_features=*/` to the first arg, `/*disabled_features=*/` to the second arg

Leo Zhao

👍

Line 527, Patchset 10:
Vincent Boisselle . resolved

we could add a test that tests the updates are rolled over when throttling enable, without the cooldown period, testing throttling in isolation

Leo Zhao

I have added a new test to verify the restarting of the delay: keyboardWillShowRefresh_RollingOver.

Line 530, Patchset 10:TEST_F(FormInputAccessoryMediatorTest, keyboardWillShowRefresh_NotSuppressed) {
Vincent Boisselle . resolved

how is it different from keyboardWillShowRefresh_NotThrottled ?

Leo Zhao

They are the same actually. I have removed one.

Open in Gerrit

Related details

Attention is currently required from:
  • Vincent Boisselle
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: I5f354fc87a92b35d56614849618d066ea2a2ca6f
Gerrit-Change-Number: 7265790
Gerrit-PatchSet: 15
Gerrit-Owner: Leo Zhao <leo...@google.com>
Gerrit-Reviewer: Leo Zhao <leo...@google.com>
Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
Gerrit-Reviewer: Vincent Boisselle <vi...@google.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-Attention: Vincent Boisselle <vi...@google.com>
Gerrit-Comment-Date: Fri, 19 Dec 2025 20:17:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Vincent Boisselle <vi...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Vincent Boisselle (Gerrit)

unread,
Dec 22, 2025, 7:29:11 AM12/22/25
to Leo Zhao, Chromium Metrics Reviews, AyeAye, Tommy Martino, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, browser-comp...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, tmartino+tran...@chromium.org
Attention needed from Leo Zhao

Vincent Boisselle added 6 comments

File ios/chrome/browser/autofill/ui_bundled/form_input_accessory/form_input_accessory_mediator+testing.h
Line 17, Patchset 15 (Latest):extern const NSTimeInterval kOptionalUpdateCooldownPeriod;
Vincent Boisselle . unresolved

this won't work with constexpr, I think we could just put those in the header file then use `inline` in the header file to avoid collisions

File ios/chrome/browser/autofill/ui_bundled/form_input_accessory/form_input_accessory_mediator.mm
Line 70, Patchset 15 (Latest):extern const NSTimeInterval kOptionalUpdateCooldownPeriod = 2.0;
Vincent Boisselle . unresolved

use `base::TimeDelta::Seconds(2)` , can be used as constexpr

Line 75, Patchset 15 (Latest):extern const NSTimeInterval kOptionalUpdateDelay = 0.5;
Vincent Boisselle . unresolved

use `base::TimeDelta::Seconds(0.5)` , can be used as constexpr

Line 1041, Patchset 15 (Latest): base::Milliseconds(kOptionalUpdateDelay * 1000),
Vincent Boisselle . unresolved

you will be able to use this one as is once converted

Line 1043, Patchset 15 (Latest): [weakSelf performOptionalUpdateIfAllowed];
Vincent Boisselle . unresolved

I think we can call `updateSuggestionsIfNeeded` directly since we now stop the scheduled task on `-retrieveSuggestionsForForm`, this simplifies the code a bit

File ios/chrome/browser/autofill/ui_bundled/form_input_accessory/form_input_accessory_mediator_unittest.mm
Line 49, Patchset 15 (Latest): base::Seconds(kOptionalUpdateCooldownPeriod * 2);
Vincent Boisselle . unresolved

I think timedelta constants supports operators,

Open in Gerrit

Related details

Attention is currently required from:
  • Leo Zhao
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not 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: I5f354fc87a92b35d56614849618d066ea2a2ca6f
    Gerrit-Change-Number: 7265790
    Gerrit-PatchSet: 15
    Gerrit-Owner: Leo Zhao <leo...@google.com>
    Gerrit-Reviewer: Leo Zhao <leo...@google.com>
    Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
    Gerrit-Reviewer: Vincent Boisselle <vi...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Leo Zhao <leo...@google.com>
    Gerrit-Comment-Date: Mon, 22 Dec 2025 12:29:05 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Leo Zhao (Gerrit)

    unread,
    Jan 5, 2026, 11:43:18 AM (13 days ago) Jan 5
    to Chromium Metrics Reviews, AyeAye, Tommy Martino, Vincent Boisselle, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, browser-comp...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, tmartino+tran...@chromium.org
    Attention needed from Vincent Boisselle

    Leo Zhao added 6 comments

    File ios/chrome/browser/autofill/ui_bundled/form_input_accessory/form_input_accessory_mediator+testing.h
    Line 17, Patchset 15:extern const NSTimeInterval kOptionalUpdateCooldownPeriod;
    Vincent Boisselle . resolved

    this won't work with constexpr, I think we could just put those in the header file then use `inline` in the header file to avoid collisions

    Leo Zhao

    `kOptionalUpdateCooldownPeriod` is now in the header file.

    File ios/chrome/browser/autofill/ui_bundled/form_input_accessory/form_input_accessory_mediator.mm
    Line 70, Patchset 15:extern const NSTimeInterval kOptionalUpdateCooldownPeriod = 2.0;
    Vincent Boisselle . resolved

    use `base::TimeDelta::Seconds(2)` , can be used as constexpr

    Leo Zhao

    This has been moved into .h file and becomes `inline constexpr`.

    Line 75, Patchset 15:extern const NSTimeInterval kOptionalUpdateDelay = 0.5;
    Vincent Boisselle . resolved

    use `base::TimeDelta::Seconds(0.5)` , can be used as constexpr

    Leo Zhao

    This has been moved into .h file and is now an `inline constexpr`.

    Line 1041, Patchset 15: base::Milliseconds(kOptionalUpdateDelay * 1000),
    Vincent Boisselle . resolved

    you will be able to use this one as is once converted

    Leo Zhao

    Updated.

    Line 1043, Patchset 15: [weakSelf performOptionalUpdateIfAllowed];
    Vincent Boisselle . resolved

    I think we can call `updateSuggestionsIfNeeded` directly since we now stop the scheduled task on `-retrieveSuggestionsForForm`, this simplifies the code a bit

    Leo Zhao

    👍 this is updated to `updateSuggestionsIfNeeded` and `performOptionalUpdateIfAllowed` is removed.

    File ios/chrome/browser/autofill/ui_bundled/form_input_accessory/form_input_accessory_mediator_unittest.mm
    Line 49, Patchset 15: base::Seconds(kOptionalUpdateCooldownPeriod * 2);
    Vincent Boisselle . resolved

    I think timedelta constants supports operators,

    Leo Zhao

    In patchset 16, this is updated to use `kOptionalUpdateCooldownPeriod` with 10ms extra.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Vincent Boisselle
    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: I5f354fc87a92b35d56614849618d066ea2a2ca6f
      Gerrit-Change-Number: 7265790
      Gerrit-PatchSet: 16
      Gerrit-Owner: Leo Zhao <leo...@google.com>
      Gerrit-Reviewer: Leo Zhao <leo...@google.com>
      Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
      Gerrit-Reviewer: Vincent Boisselle <vi...@google.com>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-Attention: Vincent Boisselle <vi...@google.com>
      Gerrit-Comment-Date: Mon, 05 Jan 2026 16:43:06 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Vincent Boisselle <vi...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Vincent Boisselle (Gerrit)

      unread,
      Jan 6, 2026, 8:09:46 AM (12 days ago) Jan 6
      to Leo Zhao, Chromium Metrics Reviews, AyeAye, Tommy Martino, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, browser-comp...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, tmartino+tran...@chromium.org
      Attention needed from Leo Zhao

      Vincent Boisselle voted and added 8 comments

      Votes added by Vincent Boisselle

      Code-Review+1

      8 comments

      Patchset-level comments
      File-level comment, Patchset 16 (Latest):
      Vincent Boisselle . resolved

      only nits

      File ios/chrome/browser/autofill/ui_bundled/form_input_accessory/form_input_accessory_mediator.h
      Line 10, Patchset 16 (Latest):#include "base/time/time.h"
      Vincent Boisselle . unresolved

      nit: #import

      File ios/chrome/browser/autofill/ui_bundled/form_input_accessory/form_input_accessory_mediator_unittest.mm
      Line 457, Patchset 16 (Latest):// The relationship of the three feature flags used in this test and a few other
      Vincent Boisselle . unresolved

      2 ?

      Line 475, Patchset 16 (Latest): task_environment_.FastForwardBy(kDelayForAcceptingOptionalUpdates);
      Vincent Boisselle . unresolved

      do we need this delay when all throttling features are disabled and there is effectively no cooldown period?

      Line 489, Patchset 16 (Latest): EXPECT_GE(count, 3);
      Vincent Boisselle . unresolved

      can we expect equality here ? , i.e. EXPET_EQ

      Line 520, Patchset 16 (Latest): task_environment_.FastForwardBy(kDelayForAcceptingOptionalUpdates);
      Vincent Boisselle . unresolved

      we could use the delay for scheduling the refresh + a small buffer to be a bit more accurate

      Line 526, Patchset 16 (Latest):// delay.
      Vincent Boisselle . unresolved

      when throttled

      Line 527, Patchset 16 (Latest):TEST_F(FormInputAccessoryMediatorTest, keyboardWillShowRefresh_RollingOver) {
      Vincent Boisselle . unresolved

      keyboardWillShowRefresh_Throttled_RollingOver

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Leo Zhao
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not 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: I5f354fc87a92b35d56614849618d066ea2a2ca6f
      Gerrit-Change-Number: 7265790
      Gerrit-PatchSet: 16
      Gerrit-Owner: Leo Zhao <leo...@google.com>
      Gerrit-Reviewer: Leo Zhao <leo...@google.com>
      Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
      Gerrit-Reviewer: Vincent Boisselle <vi...@google.com>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-Attention: Leo Zhao <leo...@google.com>
      Gerrit-Comment-Date: Tue, 06 Jan 2026 13:09:37 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Vincent Boisselle (Gerrit)

      unread,
      Jan 6, 2026, 4:14:03 PM (12 days ago) Jan 6
      to Leo Zhao, Chromium Metrics Reviews, AyeAye, Tommy Martino, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, browser-comp...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, tmartino+tran...@chromium.org
      Attention needed from Leo Zhao

      Vincent Boisselle voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Leo Zhao
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not 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: I5f354fc87a92b35d56614849618d066ea2a2ca6f
      Gerrit-Change-Number: 7265790
      Gerrit-PatchSet: 17
      Gerrit-Owner: Leo Zhao <leo...@google.com>
      Gerrit-Reviewer: Leo Zhao <leo...@google.com>
      Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
      Gerrit-Reviewer: Vincent Boisselle <vi...@google.com>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-Attention: Leo Zhao <leo...@google.com>
      Gerrit-Comment-Date: Tue, 06 Jan 2026 21:13:53 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Leo Zhao (Gerrit)

      unread,
      Jan 6, 2026, 5:23:10 PM (12 days ago) Jan 6
      to Vincent Boisselle, Chromium Metrics Reviews, AyeAye, Tommy Martino, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, browser-comp...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, tmartino+tran...@chromium.org

      Leo Zhao added 7 comments

      File ios/chrome/browser/autofill/ui_bundled/form_input_accessory/form_input_accessory_mediator.h
      Line 10, Patchset 16:#include "base/time/time.h"
      Vincent Boisselle . resolved

      nit: #import

      Leo Zhao

      Done

      File ios/chrome/browser/autofill/ui_bundled/form_input_accessory/form_input_accessory_mediator_unittest.mm
      Line 457, Patchset 16:// The relationship of the three feature flags used in this test and a few other
      Vincent Boisselle . resolved

      2 ?

      Leo Zhao

      Done

      Line 475, Patchset 16: task_environment_.FastForwardBy(kDelayForAcceptingOptionalUpdates);
      Vincent Boisselle . resolved

      do we need this delay when all throttling features are disabled and there is effectively no cooldown period?

      Leo Zhao

      Done

      Line 489, Patchset 16: EXPECT_GE(count, 3);
      Vincent Boisselle . resolved

      can we expect equality here ? , i.e. EXPET_EQ

      Leo Zhao

      Done

      Line 520, Patchset 16: task_environment_.FastForwardBy(kDelayForAcceptingOptionalUpdates);
      Vincent Boisselle . resolved

      we could use the delay for scheduling the refresh + a small buffer to be a bit more accurate

      Leo Zhao

      Done

      Line 526, Patchset 16:// delay.
      Vincent Boisselle . resolved

      when throttled

      Leo Zhao

      Done

      Line 527, Patchset 16:TEST_F(FormInputAccessoryMediatorTest, keyboardWillShowRefresh_RollingOver) {
      Vincent Boisselle . resolved

      keyboardWillShowRefresh_Throttled_RollingOver

      Leo Zhao

      Done

      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement is not 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: I5f354fc87a92b35d56614849618d066ea2a2ca6f
        Gerrit-Change-Number: 7265790
        Gerrit-PatchSet: 17
        Gerrit-Owner: Leo Zhao <leo...@google.com>
        Gerrit-Reviewer: Leo Zhao <leo...@google.com>
        Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
        Gerrit-Reviewer: Vincent Boisselle <vi...@google.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-Comment-Date: Tue, 06 Jan 2026 22:22:55 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Leo Zhao (Gerrit)

        unread,
        Jan 6, 2026, 9:34:31 PM (11 days ago) Jan 6
        to Vincent Boisselle, Chromium Metrics Reviews, AyeAye, Tommy Martino, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, browser-comp...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, tmartino+tran...@chromium.org
        Attention needed from Vincent Boisselle

        Leo Zhao added 1 comment

        Patchset-level comments
        File-level comment, Patchset 19 (Latest):
        Leo Zhao . resolved

        Pathset 18 is a rebase (on main after the cut off CL is merged). Pathset 19 added a change suggested in the cut off CL, moving setup code with no assertions into FormInputAccessoryViewControllerTest's constructor.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Vincent Boisselle
        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: I5f354fc87a92b35d56614849618d066ea2a2ca6f
        Gerrit-Change-Number: 7265790
        Gerrit-PatchSet: 19
        Gerrit-Owner: Leo Zhao <leo...@google.com>
        Gerrit-Reviewer: Leo Zhao <leo...@google.com>
        Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
        Gerrit-Reviewer: Vincent Boisselle <vi...@google.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-Attention: Vincent Boisselle <vi...@google.com>
        Gerrit-Comment-Date: Wed, 07 Jan 2026 02:34:18 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Vincent Boisselle (Gerrit)

        unread,
        Jan 7, 2026, 6:24:52 AM (11 days ago) Jan 7
        to Leo Zhao, Chromium Metrics Reviews, AyeAye, Tommy Martino, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, browser-comp...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, tmartino+tran...@chromium.org
        Attention needed from Leo Zhao

        Vincent Boisselle voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Leo Zhao
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement is not 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: I5f354fc87a92b35d56614849618d066ea2a2ca6f
        Gerrit-Change-Number: 7265790
        Gerrit-PatchSet: 19
        Gerrit-Owner: Leo Zhao <leo...@google.com>
        Gerrit-Reviewer: Leo Zhao <leo...@google.com>
        Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
        Gerrit-Reviewer: Vincent Boisselle <vi...@google.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-Attention: Leo Zhao <leo...@google.com>
        Gerrit-Comment-Date: Wed, 07 Jan 2026 11:24:43 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Vincent Boisselle (Gerrit)

        unread,
        Jan 8, 2026, 12:57:48 PM (10 days ago) Jan 8
        to Leo Zhao, Chromium Metrics Reviews, AyeAye, Tommy Martino, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, browser-comp...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, tmartino+tran...@chromium.org
        Attention needed from Leo Zhao

        Vincent Boisselle voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Leo Zhao
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement is not 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: I5f354fc87a92b35d56614849618d066ea2a2ca6f
        Gerrit-Change-Number: 7265790
        Gerrit-PatchSet: 20
        Gerrit-Owner: Leo Zhao <leo...@google.com>
        Gerrit-Reviewer: Leo Zhao <leo...@google.com>
        Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
        Gerrit-Reviewer: Vincent Boisselle <vi...@google.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-Attention: Leo Zhao <leo...@google.com>
        Gerrit-Comment-Date: Thu, 08 Jan 2026 17:57:37 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Tommy Martino (Gerrit)

        unread,
        Jan 14, 2026, 1:30:30 PM (4 days ago) Jan 14
        to Leo Zhao, Vincent Boisselle, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, browser-comp...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, tmartino+tran...@chromium.org
        Attention needed from Leo Zhao

        Tommy Martino added 4 comments

        File ios/chrome/browser/autofill/form_input_accessory/coordinator/form_input_accessory_mediator.h
        Line 20, Patchset 20 (Latest):// The period from an optional update is requested to it is being carried out.
        Tommy Martino . unresolved

        nit: "The period from when an optional update is requested to when it is carried out."

        File ios/chrome/browser/autofill/form_input_accessory/coordinator/form_input_accessory_mediator.mm
        File-level comment, Patchset 20 (Latest):
        Tommy Martino . unresolved

        WDYT about moving the new logic (the new methods, the timers, etc) into a new C++ class, something like `KeyboardAccessoryRefreshScheduler`? The mediator could own an instance of the scheduler, and the scheduler could hold a `__weak id<SomeNewProtocol>` where `SomeNewProtocol` declares just `updateSuggestionsIfNeeded`.

        It would let us remove some logic from this (huge) class, it would be a nice single-purpose object, and I think it would be more testable.

        Line 998, Patchset 20 (Latest):// 2. avoid triggering a -retrieveSuggestions call with staled data just before
        Tommy Martino . unresolved

        sp: stale

        Line 1001, Patchset 20 (Latest):// The graph below shows the timeline of optional updates.
        // suggestions update
        // request ^
        // delay v cooldown period delay|
        // |------|...|---------------------|---------|.....
        // ^ | | ^ ^ ^
        // | v v | | |
        // | update update optional | |
        // | update | optional
        // optional (rejected) | update (reset delay)
        // update optional
        // (scheduled) update
        // (scheduled)
        // In the graph above:
        Tommy Martino . resolved

        This is a great comment, thanks for this!

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Leo Zhao
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement is not 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: I5f354fc87a92b35d56614849618d066ea2a2ca6f
          Gerrit-Change-Number: 7265790
          Gerrit-PatchSet: 20
          Gerrit-Owner: Leo Zhao <leo...@google.com>
          Gerrit-Reviewer: Leo Zhao <leo...@google.com>
          Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
          Gerrit-Reviewer: Vincent Boisselle <vi...@google.com>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-Attention: Leo Zhao <leo...@google.com>
          Gerrit-Comment-Date: Wed, 14 Jan 2026 18:30:20 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Leo Zhao (Gerrit)

          unread,
          Jan 16, 2026, 12:50:49 PM (2 days ago) Jan 16
          to Vincent Boisselle, Chromium Metrics Reviews, AyeAye, Tommy Martino, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, browser-comp...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, tmartino+tran...@chromium.org
          Attention needed from Tommy Martino and Vincent Boisselle

          Leo Zhao added 3 comments

          File ios/chrome/browser/autofill/form_input_accessory/coordinator/form_input_accessory_mediator.h
          Line 20, Patchset 20:// The period from an optional update is requested to it is being carried out.
          Tommy Martino . resolved

          nit: "The period from when an optional update is requested to when it is carried out."

          Leo Zhao

          Updated.

          File ios/chrome/browser/autofill/form_input_accessory/coordinator/form_input_accessory_mediator.mm
          File-level comment, Patchset 20:
          Tommy Martino . resolved

          WDYT about moving the new logic (the new methods, the timers, etc) into a new C++ class, something like `KeyboardAccessoryRefreshScheduler`? The mediator could own an instance of the scheduler, and the scheduler could hold a `__weak id<SomeNewProtocol>` where `SomeNewProtocol` declares just `updateSuggestionsIfNeeded`.

          It would let us remove some logic from this (huge) class, it would be a nice single-purpose object, and I think it would be more testable.

          Leo Zhao

          I have moved the timers and the checking logic into the new C++ class. Early in this CL, "refresh" is opted out in favor of "optional update". So, `KeyboardAccessoryRefreshScheduler` becomes `KeyboardAccessoryOptionalUpdateScheduler`. The function with the long comment remains in this file, with internal logic moved into the new c++ class. `scheduleOptionalUpdate` could have been removed too. However, the comment describes the result of the scheduler and how it is being utilized, so it is fitting to keep the comment still in this class. So, scheduleOptionalUpdate is largely just to accommodate the comment.

          Line 998, Patchset 20:// 2. avoid triggering a -retrieveSuggestions call with staled data just before
          Tommy Martino . resolved

          sp: stale

          Leo Zhao

          Updated.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Tommy Martino
          • Vincent Boisselle
          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: I5f354fc87a92b35d56614849618d066ea2a2ca6f
          Gerrit-Change-Number: 7265790
          Gerrit-PatchSet: 21
          Gerrit-Owner: Leo Zhao <leo...@google.com>
          Gerrit-Reviewer: Leo Zhao <leo...@google.com>
          Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
          Gerrit-Reviewer: Vincent Boisselle <vi...@google.com>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-Attention: Vincent Boisselle <vi...@google.com>
          Gerrit-Attention: Tommy Martino <tmar...@chromium.org>
          Gerrit-Comment-Date: Fri, 16 Jan 2026 17:50:42 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Tommy Martino <tmar...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Tommy Martino (Gerrit)

          unread,
          Jan 16, 2026, 1:56:27 PM (2 days ago) Jan 16
          to Leo Zhao, Vincent Boisselle, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, browser-comp...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, tmartino+tran...@chromium.org
          Attention needed from Leo Zhao and Vincent Boisselle

          Tommy Martino voted and added 3 comments

          Votes added by Tommy Martino

          Code-Review+1

          3 comments

          Patchset-level comments
          File-level comment, Patchset 21 (Latest):
          Tommy Martino . resolved

          lgtm, thanks!

          File ios/chrome/browser/autofill/form_input_accessory/coordinator/form_input_accessory_mediator.mm
          Line 207, Patchset 21 (Latest): std::unique_ptr<KeyboardAccessoryOptionalUpdateScheduler>
          Tommy Martino . unresolved

          Generally, avoid `unique_ptr` for objects that won't change ownership/be moved. Instead, either hold the object directly when possible, or use an std::optional when delayed initialization is necessary.

          Ref: https://abseil.io/tips/187

          File ios/chrome/browser/autofill/form_input_accessory/coordinator/keyboard_accessory_optional_update_scheduler.mm
          Line 22, Patchset 21 (Latest): __weak id<KeyboardAccessoryOptionalUpdateSchedulerDelegate> weak_delegate =
          delegate_;
          Tommy Martino . unresolved

          `delegate_` is already weak 😊

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Leo Zhao
          • Vincent Boisselle
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement is not 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: I5f354fc87a92b35d56614849618d066ea2a2ca6f
          Gerrit-Change-Number: 7265790
          Gerrit-PatchSet: 21
          Gerrit-Owner: Leo Zhao <leo...@google.com>
          Gerrit-Reviewer: Leo Zhao <leo...@google.com>
          Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
          Gerrit-Reviewer: Vincent Boisselle <vi...@google.com>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-Attention: Leo Zhao <leo...@google.com>
          Gerrit-Attention: Vincent Boisselle <vi...@google.com>
          Gerrit-Comment-Date: Fri, 16 Jan 2026 18:56:17 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Vincent Boisselle (Gerrit)

          unread,
          Jan 16, 2026, 1:57:22 PM (2 days ago) Jan 16
          to Leo Zhao, Tommy Martino, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, browser-comp...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, tmartino+tran...@chromium.org
          Attention needed from Leo Zhao

          Vincent Boisselle voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Leo Zhao
          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: I5f354fc87a92b35d56614849618d066ea2a2ca6f
            Gerrit-Change-Number: 7265790
            Gerrit-PatchSet: 21
            Gerrit-Owner: Leo Zhao <leo...@google.com>
            Gerrit-Reviewer: Leo Zhao <leo...@google.com>
            Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
            Gerrit-Reviewer: Vincent Boisselle <vi...@google.com>
            Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
            Gerrit-Attention: Leo Zhao <leo...@google.com>
            Gerrit-Comment-Date: Fri, 16 Jan 2026 18:57:14 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Leo Zhao (Gerrit)

            unread,
            Jan 16, 2026, 3:07:39 PM (2 days ago) Jan 16
            to Vincent Boisselle, Tommy Martino, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, browser-comp...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, tmartino+tran...@chromium.org
            Attention needed from Tommy Martino and Vincent Boisselle

            Leo Zhao added 2 comments

            File ios/chrome/browser/autofill/form_input_accessory/coordinator/form_input_accessory_mediator.mm
            Line 207, Patchset 21: std::unique_ptr<KeyboardAccessoryOptionalUpdateScheduler>
            Tommy Martino . resolved

            Generally, avoid `unique_ptr` for objects that won't change ownership/be moved. Instead, either hold the object directly when possible, or use an std::optional when delayed initialization is necessary.

            Ref: https://abseil.io/tips/187

            Leo Zhao

            Updated.

            File ios/chrome/browser/autofill/form_input_accessory/coordinator/keyboard_accessory_optional_update_scheduler.mm
            Line 22, Patchset 21: __weak id<KeyboardAccessoryOptionalUpdateSchedulerDelegate> weak_delegate =
            delegate_;
            Tommy Martino . resolved

            `delegate_` is already weak 😊

            Leo Zhao

            👍

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Tommy Martino
            • Vincent Boisselle
            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: I5f354fc87a92b35d56614849618d066ea2a2ca6f
              Gerrit-Change-Number: 7265790
              Gerrit-PatchSet: 22
              Gerrit-Owner: Leo Zhao <leo...@google.com>
              Gerrit-Reviewer: Leo Zhao <leo...@google.com>
              Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
              Gerrit-Reviewer: Vincent Boisselle <vi...@google.com>
              Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
              Gerrit-Attention: Vincent Boisselle <vi...@google.com>
              Gerrit-Attention: Tommy Martino <tmar...@chromium.org>
              Gerrit-Comment-Date: Fri, 16 Jan 2026 20:07:35 +0000
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Tommy Martino (Gerrit)

              unread,
              Jan 16, 2026, 3:08:45 PM (2 days ago) Jan 16
              to Leo Zhao, Vincent Boisselle, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, browser-comp...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, tmartino+tran...@chromium.org
              Attention needed from Leo Zhao and Vincent Boisselle

              Tommy Martino voted Code-Review+1

              Code-Review+1
              Open in Gerrit

              Related details

              Attention is currently required from:
              • Leo Zhao
              • Vincent Boisselle
              Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement satisfiedCode-Owners
                • requirement is not 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: I5f354fc87a92b35d56614849618d066ea2a2ca6f
                Gerrit-Change-Number: 7265790
                Gerrit-PatchSet: 22
                Gerrit-Owner: Leo Zhao <leo...@google.com>
                Gerrit-Reviewer: Leo Zhao <leo...@google.com>
                Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
                Gerrit-Reviewer: Vincent Boisselle <vi...@google.com>
                Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                Gerrit-Attention: Leo Zhao <leo...@google.com>
                Gerrit-Attention: Vincent Boisselle <vi...@google.com>
                Gerrit-Comment-Date: Fri, 16 Jan 2026 20:08:33 +0000
                Gerrit-HasComments: No
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Leo Zhao (Gerrit)

                unread,
                Jan 16, 2026, 3:47:41 PM (2 days ago) Jan 16
                to Tommy Martino, Vincent Boisselle, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, browser-comp...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, tmartino+tran...@chromium.org
                Attention needed from Vincent Boisselle

                Leo Zhao added 1 comment

                Patchset-level comments
                File-level comment, Patchset 22 (Latest):
                Leo Zhao . resolved

                Retrying the Dry CQ Run. The error seems not related to this CL. I have seen a similar issue early this week where a test failed, but I can not find that test in our codebase.

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Vincent Boisselle
                Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement satisfiedCode-Owners
                • requirement is not 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: I5f354fc87a92b35d56614849618d066ea2a2ca6f
                Gerrit-Change-Number: 7265790
                Gerrit-PatchSet: 22
                Gerrit-Owner: Leo Zhao <leo...@google.com>
                Gerrit-Reviewer: Leo Zhao <leo...@google.com>
                Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
                Gerrit-Reviewer: Vincent Boisselle <vi...@google.com>
                Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                Gerrit-Attention: Vincent Boisselle <vi...@google.com>
                Gerrit-Comment-Date: Fri, 16 Jan 2026 20:47:30 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy
                Reply all
                Reply to author
                Forward
                0 new messages