[Otp4Bd] Introduce expiration closure to Subscription Manager [chromium/src : main]

0 views
Skip to first unread message

Salma Aly (Gerrit)

unread,
Jul 16, 2026, 11:15:05 AM (8 days ago) Jul 16
to chromium...@chromium.org, mfoltz+wa...@chromium.org

Salma Aly has uploaded the change for review

Commit message

[Otp4Bd] Introduce expiration closure to Subscription Manager

The OneTimeTokenServiceImpl currently handles subscriptions to OTPs
(both SMS and Gmail) via the generic ExpiringSubscriptionManager.
When a subscription reaches its timeout, it is silently dropped. This
works fine for SMS, but leaves Gmail OTP fillers (like the AttemptOtpFillingTool)
hanging indefinitely because no explicit action result is reported back.

To fix this without regressing the SMS OTP backend, this CL introduces
an optional `expiration_callback` to `ExpiringSubscriptionManager::Subscribe()`.
If provided, the manager will run it when the subscription is purged
during `ProcessExpirations()`.

Inside `OneTimeTokenServiceImpl::Subscribe`, we leverage this parameter
for Gmail sources by supplying a callback that yields the newly added
`OneTimeTokenRetrievalError::kSubscriptionExpired`. This allows the caller
to cleanly catch timeout signals while keeping the SMS flow untouched.

Bug: b/530535640
TAG=agy
Change-Id: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda

Change diff


Change information

Files:
  • M components/one_time_tokens/core/browser/one_time_token_retrieval_error.h
  • M components/one_time_tokens/core/browser/one_time_token_service_impl.cc
  • M components/one_time_tokens/core/browser/one_time_token_service_impl_unittest.cc
  • M components/one_time_tokens/core/browser/util/expiring_subscription_manager.cc
  • M components/one_time_tokens/core/browser/util/expiring_subscription_manager.h
  • M components/one_time_tokens/core/browser/util/expiring_subscription_manager_unittest.cc
Change size: M
Delta: 6 files changed, 61 insertions(+), 7 deletions(-)
Open in Gerrit

Related details

Attention set is empty
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: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
Gerrit-Change-Number: 8107487
Gerrit-PatchSet: 1
Gerrit-Owner: Salma Aly <salmaab...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Salma Aly (Gerrit)

unread,
Jul 17, 2026, 10:18:34 AM (7 days ago) Jul 17
to Ioana Treib, Bekzhan Kassenov, Chromium LUCI CQ, chromium...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Bekzhan Kassenov and Ioana Treib

Salma Aly voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Bekzhan Kassenov
  • Ioana Treib
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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
Gerrit-Change-Number: 8107487
Gerrit-PatchSet: 3
Gerrit-Owner: Salma Aly <salmaab...@google.com>
Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
Gerrit-Attention: Ioana Treib <ioa...@chromium.org>
Gerrit-Comment-Date: Fri, 17 Jul 2026 14:18:16 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Bekzhan Kassenov (Gerrit)

unread,
Jul 17, 2026, 10:22:23 AM (7 days ago) Jul 17
to Salma Aly, Ioana Treib, Chromium LUCI CQ, chromium...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Ioana Treib and Salma Aly

Bekzhan Kassenov added 1 comment

File components/one_time_tokens/core/browser/one_time_token_service_impl.cc
Line 62, Patchset 3 (Latest): expiration, callback,
Bekzhan Kassenov . unresolved

I am not an expert here, but is it fine not std::move-ing the callback?

Open in Gerrit

Related details

Attention is currently required from:
  • Ioana Treib
  • Salma Aly
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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
    Gerrit-Change-Number: 8107487
    Gerrit-PatchSet: 3
    Gerrit-Owner: Salma Aly <salmaab...@google.com>
    Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
    Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
    Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
    Gerrit-Attention: Salma Aly <salmaab...@google.com>
    Gerrit-Attention: Ioana Treib <ioa...@chromium.org>
    Gerrit-Comment-Date: Fri, 17 Jul 2026 14:22:02 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Salma Aly (Gerrit)

    unread,
    Jul 17, 2026, 10:24:38 AM (7 days ago) Jul 17
    to Ioana Treib, Bekzhan Kassenov, Chromium LUCI CQ, chromium...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Bekzhan Kassenov and Ioana Treib

    Salma Aly added 1 comment

    File components/one_time_tokens/core/browser/one_time_token_service_impl.cc
    Line 62, Patchset 3 (Latest): expiration, callback,
    Bekzhan Kassenov . unresolved

    I am not an expert here, but is it fine not std::move-ing the callback?

    Salma Aly

    I asked the same question :)

    AI told me since we are moving it later in the in line 64 we should not move it or it will be null

    @ioa...@chromium.org wdyt?, you should tell us if the AI is just trying to convince me with nonsense

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Bekzhan Kassenov
    • Ioana Treib
    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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
    Gerrit-Change-Number: 8107487
    Gerrit-PatchSet: 3
    Gerrit-Owner: Salma Aly <salmaab...@google.com>
    Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
    Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
    Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
    Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
    Gerrit-Attention: Ioana Treib <ioa...@chromium.org>
    Gerrit-Comment-Date: Fri, 17 Jul 2026 14:24:20 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Bekzhan Kassenov <bkas...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Bekzhan Kassenov (Gerrit)

    unread,
    Jul 17, 2026, 10:38:58 AM (7 days ago) Jul 17
    to Salma Aly, Ioana Treib, Chromium LUCI CQ, chromium...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Ioana Treib and Salma Aly

    Bekzhan Kassenov added 1 comment

    File components/one_time_tokens/core/browser/one_time_token_service_impl.cc
    Line 62, Patchset 3 (Latest): expiration, callback,
    Bekzhan Kassenov . unresolved

    I am not an expert here, but is it fine not std::move-ing the callback?

    Salma Aly

    I asked the same question :)

    AI told me since we are moving it later in the in line 64 we should not move it or it will be null

    @ioa...@chromium.org wdyt?, you should tell us if the AI is just trying to convince me with nonsense

    Bekzhan Kassenov

    We aren't moving is there either. Both places create copies, and I don't know if callbacks can be copied.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ioana Treib
    • Salma Aly
    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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
    Gerrit-Change-Number: 8107487
    Gerrit-PatchSet: 3
    Gerrit-Owner: Salma Aly <salmaab...@google.com>
    Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
    Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
    Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
    Gerrit-Attention: Salma Aly <salmaab...@google.com>
    Gerrit-Attention: Ioana Treib <ioa...@chromium.org>
    Gerrit-Comment-Date: Fri, 17 Jul 2026 14:38:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Bekzhan Kassenov <bkas...@google.com>
    Comment-In-Reply-To: Salma Aly <salmaab...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ioana Treib (Gerrit)

    unread,
    Jul 20, 2026, 8:57:30 AM (4 days ago) Jul 20
    to Salma Aly, Bekzhan Kassenov, Chromium LUCI CQ, chromium...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Salma Aly

    Ioana Treib added 4 comments

    File components/one_time_tokens/core/browser/one_time_token_service_impl.cc
    Line 62, Patchset 3 (Latest): expiration, callback,
    Bekzhan Kassenov . unresolved

    I am not an expert here, but is it fine not std::move-ing the callback?

    Salma Aly

    I asked the same question :)

    AI told me since we are moving it later in the in line 64 we should not move it or it will be null

    @ioa...@chromium.org wdyt?, you should tell us if the AI is just trying to convince me with nonsense

    Bekzhan Kassenov

    We aren't moving is there either. Both places create copies, and I don't know if callbacks can be copied.

    Ioana Treib

    A RepeatingCallback is copyable. A OnceCallback is not (for obvious reasons, it needs to ensure it's only called once).
    See: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/callback.md#oncecallback_and-repeatingcallback

    So, copying is fine, but the code readability here isn't.

    ```
    using CallbackSignature =
    void(OneTimeTokenSource,
    base::expected<OneTimeToken, OneTimeTokenRetrievalError>);
    using Callback = base::RepeatingCallback<CallbackSignature>;
    ```

    This abstracts too much of the type away, so I suggest calling it something else or using the entire type.


    One more piece of info about std::move in general: using objects after a move results in undefined behavior.

    File components/one_time_tokens/core/browser/util/expiring_subscription_manager.h
    Line 164, Patchset 3 (Latest): subscription.expiration_callback.Reset();
    Ioana Treib . unresolved

    Does this mean that once a notification goes through, the subscription won't expire? Is it cancelled? I might be misunderstanding something here.

    Line 124, Patchset 3 (Latest): // `callback` should be safe to call during this time (it may be protected via
    // a WeakPtr binding). It is called every time `Notify()` is called while the
    // subscription did not not expire.
    Ioana Treib . unresolved

    Please add some details about the `expiration_callback`, also maybe how it interacts with `callback`.

    File components/one_time_tokens/core/browser/util/expiring_subscription_manager_unittest.cc
    Line 60, Patchset 3 (Latest):TEST_F(ExpiringSubscriptionTest, ExpirationCallback) {
    Ioana Treib . unresolved

    What about a test that checks that the expiration callback is not invoked if there was a notification?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Salma Aly
    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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
    Gerrit-Change-Number: 8107487
    Gerrit-PatchSet: 3
    Gerrit-Owner: Salma Aly <salmaab...@google.com>
    Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
    Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
    Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
    Gerrit-Attention: Salma Aly <salmaab...@google.com>
    Gerrit-Comment-Date: Mon, 20 Jul 2026 12:57:11 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Salma Aly (Gerrit)

    unread,
    Jul 20, 2026, 10:54:59 AM (4 days ago) Jul 20
    to Ioana Treib, Bekzhan Kassenov, Chromium LUCI CQ, chromium...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Bekzhan Kassenov and Ioana Treib

    Salma Aly added 4 comments

    File components/one_time_tokens/core/browser/one_time_token_service_impl.cc
    Line 62, Patchset 3: expiration, callback,
    Bekzhan Kassenov . resolved

    I am not an expert here, but is it fine not std::move-ing the callback?

    Salma Aly

    I asked the same question :)

    AI told me since we are moving it later in the in line 64 we should not move it or it will be null

    @ioa...@chromium.org wdyt?, you should tell us if the AI is just trying to convince me with nonsense

    Bekzhan Kassenov

    We aren't moving is there either. Both places create copies, and I don't know if callbacks can be copied.

    Ioana Treib

    A RepeatingCallback is copyable. A OnceCallback is not (for obvious reasons, it needs to ensure it's only called once).
    See: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/callback.md#oncecallback_and-repeatingcallback

    So, copying is fine, but the code readability here isn't.

    ```
    using CallbackSignature =
    void(OneTimeTokenSource,
    base::expected<OneTimeToken, OneTimeTokenRetrievalError>);
    using Callback = base::RepeatingCallback<CallbackSignature>;
    ```

    This abstracts too much of the type away, so I suggest calling it something else or using the entire type.


    One more piece of info about std::move in general: using objects after a move results in undefined behavior.

    Salma Aly

    Thank you for the info @ioa...@chromium.org 😊

    Great point about the alias hiding the RepeatingCallback semantics! I completely agree, I will do it in a separate cl though.

    File components/one_time_tokens/core/browser/util/expiring_subscription_manager.h
    Line 164, Patchset 3: subscription.expiration_callback.Reset();
    Ioana Treib . unresolved

    Does this mean that once a notification goes through, the subscription won't expire? Is it cancelled? I might be misunderstanding something here.

    Salma Aly

    My understanding that the way the whole code in the `OneTimeTokenService` is built is for the subscriber get all the OTPs received during the subscription period. In addition, the subscription expires when the period of the subscription is over. None of this has changed in this cl

    I thought it's only acceptable to return the "subscriptionExpiredError" when we didn't get an OTP to use. But if we return something that can be used no need to return this error, otherwise we would return it at the end of all the subscription periods (we might then consume it or we might have already returned the OTP and tool execution is done)

    Now what is going on in this cl is that if there is at least one OTP returned, we don't return "subscriptionExpiredError". I think that after the sender matching is done, we should `Reset` the subscription callback when we return an OTP that matches a sender.

    wdyt? We can talk about this f2f for easier discussion

    Line 124, Patchset 3: // `callback` should be safe to call during this time (it may be protected via

    // a WeakPtr binding). It is called every time `Notify()` is called while the
    // subscription did not not expire.
    Ioana Treib . resolved

    Please add some details about the `expiration_callback`, also maybe how it interacts with `callback`.

    Salma Aly

    Done

    File components/one_time_tokens/core/browser/util/expiring_subscription_manager_unittest.cc
    Line 60, Patchset 3:TEST_F(ExpiringSubscriptionTest, ExpirationCallback) {
    Ioana Treib . resolved

    What about a test that checks that the expiration callback is not invoked if there was a notification?

    Salma Aly

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Bekzhan Kassenov
    • Ioana Treib
    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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
    Gerrit-Change-Number: 8107487
    Gerrit-PatchSet: 4
    Gerrit-Owner: Salma Aly <salmaab...@google.com>
    Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
    Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
    Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
    Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
    Gerrit-Attention: Ioana Treib <ioa...@chromium.org>
    Gerrit-Comment-Date: Mon, 20 Jul 2026 14:54:42 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Bekzhan Kassenov <bkas...@google.com>
    Comment-In-Reply-To: Salma Aly <salmaab...@google.com>
    Comment-In-Reply-To: Ioana Treib <ioa...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Bekzhan Kassenov (Gerrit)

    unread,
    Jul 21, 2026, 4:24:31 AM (3 days ago) Jul 21
    to Salma Aly, Ioana Treib, Chromium LUCI CQ, chromium...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Ioana Treib and Salma Aly

    Bekzhan Kassenov added 2 comments

    File components/one_time_tokens/core/browser/one_time_token_service_impl.cc
    Line 65, Patchset 4 (Latest): expiration, callback, std::move(expiration_callback));
    Bekzhan Kassenov . unresolved

    Shoudln't we now std::move this one instead of making a copy? We made a copy above for the expiration case, so this should be move-able now

    File components/one_time_tokens/core/browser/util/expiring_subscription_manager.h
    Line 164, Patchset 3: subscription.expiration_callback.Reset();
    Ioana Treib . unresolved

    Does this mean that once a notification goes through, the subscription won't expire? Is it cancelled? I might be misunderstanding something here.

    Salma Aly

    My understanding that the way the whole code in the `OneTimeTokenService` is built is for the subscriber get all the OTPs received during the subscription period. In addition, the subscription expires when the period of the subscription is over. None of this has changed in this cl

    I thought it's only acceptable to return the "subscriptionExpiredError" when we didn't get an OTP to use. But if we return something that can be used no need to return this error, otherwise we would return it at the end of all the subscription periods (we might then consume it or we might have already returned the OTP and tool execution is done)

    Now what is going on in this cl is that if there is at least one OTP returned, we don't return "subscriptionExpiredError". I think that after the sender matching is done, we should `Reset` the subscription callback when we return an OTP that matches a sender.

    wdyt? We can talk about this f2f for easier discussion

    Bekzhan Kassenov

    I agree that this turns the second callback into "NoOtpValuesAvailable" callback instead of "SubscriptionEnded" callback which is at least misleading name-wise.

    One approach we could take is:

    • Remove this line. This will make the callback really the "subscription ended" one.
    • Allow an second expiration callback in OneTimeTokenService::Subscribe.
    • Let the client track how to react to the end of subscription - it could check that it didn't receive an OTPs and react accordingly.

    WDYT?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ioana Treib
    • Salma Aly
    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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
    Gerrit-Change-Number: 8107487
    Gerrit-PatchSet: 4
    Gerrit-Owner: Salma Aly <salmaab...@google.com>
    Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
    Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
    Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
    Gerrit-Attention: Salma Aly <salmaab...@google.com>
    Gerrit-Attention: Ioana Treib <ioa...@chromium.org>
    Gerrit-Comment-Date: Tue, 21 Jul 2026 08:24:15 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Salma Aly (Gerrit)

    unread,
    Jul 21, 2026, 4:59:46 AM (3 days ago) Jul 21
    to Ioana Treib, Bekzhan Kassenov, Chromium LUCI CQ, chromium...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Bekzhan Kassenov and Ioana Treib

    Salma Aly added 1 comment

    File components/one_time_tokens/core/browser/util/expiring_subscription_manager.h
    Line 164, Patchset 3: subscription.expiration_callback.Reset();
    Ioana Treib . unresolved

    Does this mean that once a notification goes through, the subscription won't expire? Is it cancelled? I might be misunderstanding something here.

    Salma Aly

    My understanding that the way the whole code in the `OneTimeTokenService` is built is for the subscriber get all the OTPs received during the subscription period. In addition, the subscription expires when the period of the subscription is over. None of this has changed in this cl

    I thought it's only acceptable to return the "subscriptionExpiredError" when we didn't get an OTP to use. But if we return something that can be used no need to return this error, otherwise we would return it at the end of all the subscription periods (we might then consume it or we might have already returned the OTP and tool execution is done)

    Now what is going on in this cl is that if there is at least one OTP returned, we don't return "subscriptionExpiredError". I think that after the sender matching is done, we should `Reset` the subscription callback when we return an OTP that matches a sender.

    wdyt? We can talk about this f2f for easier discussion

    Bekzhan Kassenov

    I agree that this turns the second callback into "NoOtpValuesAvailable" callback instead of "SubscriptionEnded" callback which is at least misleading name-wise.

    One approach we could take is:

    • Remove this line. This will make the callback really the "subscription ended" one.
    • Allow an second expiration callback in OneTimeTokenService::Subscribe.
    • Let the client track how to react to the end of subscription - it could check that it didn't receive an OTPs and react accordingly.

    WDYT?

    Salma Aly

    Yup this will work, but wouldn't a timer in the actor service be much more simpler?

    I think what I don't like about this approach is that fact that we will need to track whether we got a matching OTP or not to decide whether or not we should consume the "SubscriptionEnded". The fact that the service has a long live time, makes this tracking complicated and error prone (we need to clean up the tracking when a new retrieval call is received and we will need to clean this subscription expired callback similar to what we do now with the other callback)

    WDYT?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Bekzhan Kassenov
    • Ioana Treib
    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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
    Gerrit-Change-Number: 8107487
    Gerrit-PatchSet: 4
    Gerrit-Owner: Salma Aly <salmaab...@google.com>
    Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
    Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
    Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
    Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
    Gerrit-Attention: Ioana Treib <ioa...@chromium.org>
    Gerrit-Comment-Date: Tue, 21 Jul 2026 08:59:27 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Bekzhan Kassenov <bkas...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ioana Treib (Gerrit)

    unread,
    Jul 21, 2026, 6:22:33 AM (3 days ago) Jul 21
    to Salma Aly, Bekzhan Kassenov, Chromium LUCI CQ, chromium...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Bekzhan Kassenov and Salma Aly

    Ioana Treib added 1 comment

    File components/one_time_tokens/core/browser/util/expiring_subscription_manager.h
    Line 164, Patchset 3: subscription.expiration_callback.Reset();
    Ioana Treib . unresolved

    Does this mean that once a notification goes through, the subscription won't expire? Is it cancelled? I might be misunderstanding something here.

    Salma Aly

    My understanding that the way the whole code in the `OneTimeTokenService` is built is for the subscriber get all the OTPs received during the subscription period. In addition, the subscription expires when the period of the subscription is over. None of this has changed in this cl

    I thought it's only acceptable to return the "subscriptionExpiredError" when we didn't get an OTP to use. But if we return something that can be used no need to return this error, otherwise we would return it at the end of all the subscription periods (we might then consume it or we might have already returned the OTP and tool execution is done)

    Now what is going on in this cl is that if there is at least one OTP returned, we don't return "subscriptionExpiredError". I think that after the sender matching is done, we should `Reset` the subscription callback when we return an OTP that matches a sender.

    wdyt? We can talk about this f2f for easier discussion

    Bekzhan Kassenov

    I agree that this turns the second callback into "NoOtpValuesAvailable" callback instead of "SubscriptionEnded" callback which is at least misleading name-wise.

    One approach we could take is:

    • Remove this line. This will make the callback really the "subscription ended" one.
    • Allow an second expiration callback in OneTimeTokenService::Subscribe.
    • Let the client track how to react to the end of subscription - it could check that it didn't receive an OTPs and react accordingly.

    WDYT?

    Salma Aly

    Yup this will work, but wouldn't a timer in the actor service be much more simpler?

    I think what I don't like about this approach is that fact that we will need to track whether we got a matching OTP or not to decide whether or not we should consume the "SubscriptionEnded". The fact that the service has a long live time, makes this tracking complicated and error prone (we need to clean up the tracking when a new retrieval call is received and we will need to clean this subscription expired callback similar to what we do now with the other callback)

    WDYT?

    Ioana Treib

    Discussed offline with Salma. I think both approaches work. If the subscription expiry callback is part of the subsciption object, then we anyway have logic to clear it when we find a match or get an error. If we do implement this with a second callback, it should be bundled with the original token received callback so that we clear them in one go.

    There is one tracking caveat. The subscription ended callback can race with the OTP domain match check, so that will add some overhead, but that will be the case with a timer in the `ActorOneTimeTokenFillingService` as well.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Bekzhan Kassenov
    • Salma Aly
    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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
    Gerrit-Change-Number: 8107487
    Gerrit-PatchSet: 4
    Gerrit-Owner: Salma Aly <salmaab...@google.com>
    Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
    Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
    Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
    Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
    Gerrit-Attention: Salma Aly <salmaab...@google.com>
    Gerrit-Comment-Date: Tue, 21 Jul 2026 10:22:12 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Salma Aly (Gerrit)

    unread,
    Jul 21, 2026, 9:55:14 AM (3 days ago) Jul 21
    to Ioana Treib, Bekzhan Kassenov, Chromium LUCI CQ, chromium...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Bekzhan Kassenov and Ioana Treib

    Salma Aly added 4 comments

    File components/one_time_tokens/core/browser/one_time_token_service_impl.h
    Line 45, Patchset 7 (Latest): [[nodiscard]] ExpiringSubscription Subscribe(
    OneTimeTokenSource source,
    Salma Aly . unresolved

    Please fix this WARNING reported by ClangTidy: check: google-default-arguments

    default arguments on virtual or override method...

    check: google-default-arguments

    default arguments on virtual or override methods are prohibited (https://clang.llvm.org/extra/clang-tidy/checks/google/default-arguments.html)

    (Note: You can add `Skip-Clang-Tidy-Checks: google-default-arguments` footer to the CL description to skip the check)


    @ioa...@chromium.org, I looked into this and apparently we should not use default values with override methods?!

    I can skip the check would that make sense? After some investigations I found out that we can fix it like https://screenshot.googleplex.com/6UcNxFppBRo8EKt, but I'm not sure if it makes sense, wdyt?

    File components/one_time_tokens/core/browser/one_time_token_service_impl.cc
    Line 65, Patchset 4: expiration, callback, std::move(expiration_callback));
    Bekzhan Kassenov . resolved

    Shoudln't we now std::move this one instead of making a copy? We made a copy above for the expiration case, so this should be move-able now

    Salma Aly

    obsolete now

    File components/one_time_tokens/core/browser/util/expiring_subscription_manager.h
    Line 164, Patchset 3: subscription.expiration_callback.Reset();
    Ioana Treib . resolved

    Does this mean that once a notification goes through, the subscription won't expire? Is it cancelled? I might be misunderstanding something here.

    Salma Aly

    My understanding that the way the whole code in the `OneTimeTokenService` is built is for the subscriber get all the OTPs received during the subscription period. In addition, the subscription expires when the period of the subscription is over. None of this has changed in this cl

    I thought it's only acceptable to return the "subscriptionExpiredError" when we didn't get an OTP to use. But if we return something that can be used no need to return this error, otherwise we would return it at the end of all the subscription periods (we might then consume it or we might have already returned the OTP and tool execution is done)

    Now what is going on in this cl is that if there is at least one OTP returned, we don't return "subscriptionExpiredError". I think that after the sender matching is done, we should `Reset` the subscription callback when we return an OTP that matches a sender.

    wdyt? We can talk about this f2f for easier discussion

    Bekzhan Kassenov

    I agree that this turns the second callback into "NoOtpValuesAvailable" callback instead of "SubscriptionEnded" callback which is at least misleading name-wise.

    One approach we could take is:

    • Remove this line. This will make the callback really the "subscription ended" one.
    • Allow an second expiration callback in OneTimeTokenService::Subscribe.
    • Let the client track how to react to the end of subscription - it could check that it didn't receive an OTPs and react accordingly.

    WDYT?

    Salma Aly

    Yup this will work, but wouldn't a timer in the actor service be much more simpler?

    I think what I don't like about this approach is that fact that we will need to track whether we got a matching OTP or not to decide whether or not we should consume the "SubscriptionEnded". The fact that the service has a long live time, makes this tracking complicated and error prone (we need to clean up the tracking when a new retrieval call is received and we will need to clean this subscription expired callback similar to what we do now with the other callback)

    WDYT?

    Ioana Treib

    Discussed offline with Salma. I think both approaches work. If the subscription expiry callback is part of the subsciption object, then we anyway have logic to clear it when we find a match or get an error. If we do implement this with a second callback, it should be bundled with the original token received callback so that we clear them in one go.

    There is one tracking caveat. The subscription ended callback can race with the OTP domain match check, so that will add some overhead, but that will be the case with a timer in the `ActorOneTimeTokenFillingService` as well.

    Salma Aly

    Done

    File components/one_time_tokens/core/browser/util/expiring_subscription_manager.cc
    Line 9, Patchset 6:namespace internal {
    ExpiringSubscriptionDataBase::ExpiringSubscriptionDataBase() = default;
    ExpiringSubscriptionDataBase::~ExpiringSubscriptionDataBase() = default;
    } // namespace internal
    Salma Aly . unresolved

    @ioa...@chromium.org please confirm that moving the ExpiringSubscriptionDataBase constructor and destructor here is okay

    AI seems convinced that having it here is better because now the object contain more complex types that might be expensive to have the deconstruction logic every time the header is included.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Bekzhan Kassenov
    • Ioana Treib
    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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
    Gerrit-Change-Number: 8107487
    Gerrit-PatchSet: 7
    Gerrit-Owner: Salma Aly <salmaab...@google.com>
    Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
    Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
    Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
    Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
    Gerrit-Attention: Ioana Treib <ioa...@chromium.org>
    Gerrit-Comment-Date: Tue, 21 Jul 2026 13:54:56 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ioana Treib (Gerrit)

    unread,
    Jul 22, 2026, 7:20:26 AM (2 days ago) Jul 22
    to Salma Aly, android-bu...@system.gserviceaccount.com, Bekzhan Kassenov, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Bekzhan Kassenov and Salma Aly

    Ioana Treib added 2 comments

    File components/one_time_tokens/core/browser/one_time_token_service_impl.h
    Line 45, Patchset 7: [[nodiscard]] ExpiringSubscription Subscribe(
    OneTimeTokenSource source,
    Salma Aly . unresolved

    Please fix this WARNING reported by ClangTidy: check: google-default-arguments

    default arguments on virtual or override method...

    check: google-default-arguments

    default arguments on virtual or override methods are prohibited (https://clang.llvm.org/extra/clang-tidy/checks/google/default-arguments.html)

    (Note: You can add `Skip-Clang-Tidy-Checks: google-default-arguments` footer to the CL description to skip the check)


    @ioa...@chromium.org, I looked into this and apparently we should not use default values with override methods?!

    I can skip the check would that make sense? After some investigations I found out that we can fix it like https://screenshot.googleplex.com/6UcNxFppBRo8EKt, but I'm not sure if it makes sense, wdyt?

    Ioana Treib

    Yeah, that is correct and I think in general default params are a bit iffy sometimes. I don't think we need a default value here. The callers can provide base::DoNothing if they don't care about expiration.

    File components/one_time_tokens/core/browser/util/expiring_subscription_manager.cc
    Line 9, Patchset 6:namespace internal {
    ExpiringSubscriptionDataBase::ExpiringSubscriptionDataBase() = default;
    ExpiringSubscriptionDataBase::~ExpiringSubscriptionDataBase() = default;
    } // namespace internal
    Salma Aly . unresolved

    @ioa...@chromium.org please confirm that moving the ExpiringSubscriptionDataBase constructor and destructor here is okay

    AI seems convinced that having it here is better because now the object contain more complex types that might be expensive to have the deconstruction logic every time the header is included.

    Ioana Treib

    I think this is actually required for non-trivial constructors/destructors. You would see a compilation error if you try to inline it in the header.


    https://chromium.googlesource.com/chromium/src/+/70.0.3538.25/styleguide/c++/c++-dos-and-donts.md#stop-inlining-constructors-and-destructors

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Bekzhan Kassenov
    • Salma Aly
    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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
    Gerrit-Change-Number: 8107487
    Gerrit-PatchSet: 10
    Gerrit-Owner: Salma Aly <salmaab...@google.com>
    Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
    Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
    Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
    Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
    Gerrit-Attention: Salma Aly <salmaab...@google.com>
    Gerrit-Comment-Date: Wed, 22 Jul 2026 11:20:08 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Salma Aly <salmaab...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Salma Aly (Gerrit)

    unread,
    Jul 23, 2026, 5:29:34 AM (yesterday) Jul 23
    to Matthias Körber, David Bokan, android-bu...@system.gserviceaccount.com, Ioana Treib, Bekzhan Kassenov, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Bekzhan Kassenov, David Bokan, Ioana Treib and Matthias Körber

    Salma Aly added 4 comments

    File chrome/browser/autofill/actor/one_time_tokens/actor_one_time_token_filling_service_impl.cc
    Line 238, Patchset 11: base::DoNothing());
    Salma Aly . resolved

    Please fix this WARNING reported by autoreview issue finding: To fulfill the goal mentioned in the commit message (preventing Gmail OTP fillers from hanging), this caller should likely provide a callback here that invokes `OnOneTimeTokenReceived` with `kSubscriptionExpired`.

    Passing `base::DoNothing()` means the behavior remains identical to before this CL for this specific filler.

    ------------


    This will be added in the child change, split for easier review

    File components/one_time_tokens/core/browser/one_time_token_service.h
    Line 61, Patchset 11: base::OnceClosure expiration_callback) = 0;
    Salma Aly . resolved

    Please fix this WARNING reported by autoreview issue finding: Since most callers currently don't need to handle expiration (as evidenced by the many `base::DoNothing()` additions in this CL), consider making this parameter optional with a default value:

    `base::OnceClosure expiration_callback = base::NullCallback()`

    This would keep the interface cleaner for callers that only care about token arrival.

    ------------

    We originally had the default value, but we removed it because "ClangTidy: check: google-default-arguments"

    File components/one_time_tokens/core/browser/one_time_token_service_impl.h
    Line 45, Patchset 7: [[nodiscard]] ExpiringSubscription Subscribe(
    OneTimeTokenSource source,
    Salma Aly . resolved

    Please fix this WARNING reported by ClangTidy: check: google-default-arguments

    default arguments on virtual or override method...

    check: google-default-arguments

    default arguments on virtual or override methods are prohibited (https://clang.llvm.org/extra/clang-tidy/checks/google/default-arguments.html)

    (Note: You can add `Skip-Clang-Tidy-Checks: google-default-arguments` footer to the CL description to skip the check)


    @ioa...@chromium.org, I looked into this and apparently we should not use default values with override methods?!

    I can skip the check would that make sense? After some investigations I found out that we can fix it like https://screenshot.googleplex.com/6UcNxFppBRo8EKt, but I'm not sure if it makes sense, wdyt?

    Ioana Treib

    Yeah, that is correct and I think in general default params are a bit iffy sometimes. I don't think we need a default value here. The callers can provide base::DoNothing if they don't care about expiration.

    Salma Aly

    Done. I just didn't want to change all the tests and other code paths that call this but don't use the callback

    File components/one_time_tokens/core/browser/util/expiring_subscription_manager.cc
    Line 9, Patchset 6:namespace internal {
    ExpiringSubscriptionDataBase::ExpiringSubscriptionDataBase() = default;
    ExpiringSubscriptionDataBase::~ExpiringSubscriptionDataBase() = default;
    } // namespace internal
    Salma Aly . resolved

    @ioa...@chromium.org please confirm that moving the ExpiringSubscriptionDataBase constructor and destructor here is okay

    AI seems convinced that having it here is better because now the object contain more complex types that might be expensive to have the deconstruction logic every time the header is included.

    Ioana Treib

    I think this is actually required for non-trivial constructors/destructors. You would see a compilation error if you try to inline it in the header.


    https://chromium.googlesource.com/chromium/src/+/70.0.3538.25/styleguide/c++/c++-dos-and-donts.md#stop-inlining-constructors-and-destructors

    Salma Aly

    Acknowledged

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Bekzhan Kassenov
    • David Bokan
    • Ioana Treib
    • Matthias Körber
    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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
      Gerrit-Change-Number: 8107487
      Gerrit-PatchSet: 15
      Gerrit-Owner: Salma Aly <salmaab...@google.com>
      Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
      Gerrit-Reviewer: David Bokan <bo...@chromium.org>
      Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
      Gerrit-Reviewer: Matthias Körber <koe...@google.com>
      Gerrit-Attention: Matthias Körber <koe...@google.com>
      Gerrit-Attention: David Bokan <bo...@chromium.org>
      Gerrit-Attention: Ioana Treib <ioa...@chromium.org>
      Gerrit-Comment-Date: Thu, 23 Jul 2026 09:29:18 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Salma Aly <salmaab...@google.com>
      Comment-In-Reply-To: Ioana Treib <ioa...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Matthias Körber (Gerrit)

      unread,
      Jul 23, 2026, 5:51:46 AM (yesterday) Jul 23
      to Salma Aly, David Bokan, android-bu...@system.gserviceaccount.com, Ioana Treib, Bekzhan Kassenov, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org, mfoltz+wa...@chromium.org
      Attention needed from Bekzhan Kassenov, David Bokan, Ioana Treib and Salma Aly

      Matthias Körber added 1 comment

      File chrome/browser/autofill/actor/one_time_tokens/actor_one_time_token_filling_service_impl.cc
      Line 283, Patchset 15: base::DoNothing());
      Matthias Körber . unresolved

      Pointed out by AI:

      The commit message mentions that `expiration_callback` was added specifically to fix `AttemptOtpFillingTool` hanging indefinitely on timeout. However, passing `base::DoNothing()` here means the subscription will still be silently dropped without notifying the caller, and the tool will still hang.

      To actually resolve the issue, we should pass a callback that invokes `retrieve_otp_callback_` with an error (e.g. by binding `OnOneTimeTokenReceived` with an unexpected result) so the pending tool request gets an explicit action result.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Bekzhan Kassenov
      • David Bokan
      • Ioana Treib
      • Salma Aly
      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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
        Gerrit-Change-Number: 8107487
        Gerrit-PatchSet: 15
        Gerrit-Owner: Salma Aly <salmaab...@google.com>
        Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
        Gerrit-Reviewer: David Bokan <bo...@chromium.org>
        Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
        Gerrit-Reviewer: Matthias Körber <koe...@google.com>
        Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
        Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
        Gerrit-Attention: Salma Aly <salmaab...@google.com>
        Gerrit-Attention: David Bokan <bo...@chromium.org>
        Gerrit-Attention: Ioana Treib <ioa...@chromium.org>
        Gerrit-Comment-Date: Thu, 23 Jul 2026 09:51:30 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Matthias Körber (Gerrit)

        unread,
        Jul 23, 2026, 5:53:40 AM (yesterday) Jul 23
        to Salma Aly, David Bokan, android-bu...@system.gserviceaccount.com, Ioana Treib, Bekzhan Kassenov, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org, mfoltz+wa...@chromium.org
        Attention needed from Bekzhan Kassenov, David Bokan, Ioana Treib and Salma Aly

        Matthias Körber added 1 comment

        File chrome/browser/autofill/actor/one_time_tokens/actor_one_time_token_filling_service_impl.cc
        Line 283, Patchset 15: base::DoNothing());
        Matthias Körber . resolved

        Pointed out by AI:

        The commit message mentions that `expiration_callback` was added specifically to fix `AttemptOtpFillingTool` hanging indefinitely on timeout. However, passing `base::DoNothing()` here means the subscription will still be silently dropped without notifying the caller, and the tool will still hang.

        To actually resolve the issue, we should pass a callback that invokes `retrieve_otp_callback_` with an error (e.g. by binding `OnOneTimeTokenReceived` with an unexpected result) so the pending tool request gets an explicit action result.

        Matthias Körber

        old patchset. closing

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Bekzhan Kassenov
        • David Bokan
        • Ioana Treib
        • Salma Aly
        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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
          Gerrit-Change-Number: 8107487
          Gerrit-PatchSet: 18
          Gerrit-Owner: Salma Aly <salmaab...@google.com>
          Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
          Gerrit-Reviewer: David Bokan <bo...@chromium.org>
          Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
          Gerrit-Reviewer: Matthias Körber <koe...@google.com>
          Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
          Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
          Gerrit-Attention: Salma Aly <salmaab...@google.com>
          Gerrit-Attention: David Bokan <bo...@chromium.org>
          Gerrit-Attention: Ioana Treib <ioa...@chromium.org>
          Gerrit-Comment-Date: Thu, 23 Jul 2026 09:53:23 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Matthias Körber <koe...@google.com>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Bekzhan Kassenov (Gerrit)

          unread,
          Jul 23, 2026, 7:46:39 AM (yesterday) Jul 23
          to Salma Aly, Matthias Körber, David Bokan, android-bu...@system.gserviceaccount.com, Ioana Treib, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org, mfoltz+wa...@chromium.org
          Attention needed from David Bokan, Ioana Treib, Matthias Körber and Salma Aly

          Bekzhan Kassenov voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • David Bokan
          • Ioana Treib
          • Matthias Körber
          • Salma Aly
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not 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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
            Gerrit-Change-Number: 8107487
            Gerrit-PatchSet: 19
            Gerrit-Owner: Salma Aly <salmaab...@google.com>
            Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
            Gerrit-Reviewer: David Bokan <bo...@chromium.org>
            Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
            Gerrit-Reviewer: Matthias Körber <koe...@google.com>
            Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
            Gerrit-Attention: Matthias Körber <koe...@google.com>
            Gerrit-Attention: Salma Aly <salmaab...@google.com>
            Gerrit-Attention: David Bokan <bo...@chromium.org>
            Gerrit-Attention: Ioana Treib <ioa...@chromium.org>
            Gerrit-Comment-Date: Thu, 23 Jul 2026 11:46:22 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Ioana Treib (Gerrit)

            unread,
            Jul 23, 2026, 9:43:19 AM (yesterday) Jul 23
            to Salma Aly, Bekzhan Kassenov, Matthias Körber, David Bokan, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org, mfoltz+wa...@chromium.org
            Attention needed from David Bokan, Matthias Körber and Salma Aly

            Ioana Treib voted and added 5 comments

            Votes added by Ioana Treib

            Code-Review+1

            5 comments

            File chrome/browser/actor/tools/attempt_otp_filling_tool_browsertest.cc
            Line 434, Patchset 19 (Latest): testing::_, testing::_))
            Ioana Treib . unresolved

            `using testing::_ ;` at the top of the file and then you can write only `_` here.

            File chrome/browser/autofill/actor/one_time_tokens/actor_one_time_token_filling_service_impl.cc
            Line 283, Patchset 19 (Latest): base::DoNothing());
            Ioana Treib . unresolved

            Please add a param name comment.

            File components/autofill/core/browser/integrators/one_time_tokens/otp_manager_impl.cc
            Line 90, Patchset 19 (Latest): base::DoNothing());
            Ioana Treib . unresolved

            Please add a param name.

            File components/one_time_tokens/core/browser/one_time_token_service_impl_unittest.cc
            Line 654, Patchset 19 (Latest): base::DoNothing());
            Ioana Treib . unresolved

            Please add param comments here and everywhere else.

            File components/one_time_tokens/core/browser/util/expiring_subscription_manager.h
            Line 135, Patchset 19 (Latest): base::OnceClosure expiration_callback = base::NullCallback()) {
            Ioana Treib . unresolved

            Considering that you're now providing this callback from everywhere, should we get rid of the default value?

            Open in Gerrit

            Related details

            Attention is currently required from:
            • David Bokan
            • Matthias Körber
            • Salma Aly
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not 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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
              Gerrit-Change-Number: 8107487
              Gerrit-PatchSet: 19
              Gerrit-Owner: Salma Aly <salmaab...@google.com>
              Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
              Gerrit-Reviewer: David Bokan <bo...@chromium.org>
              Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
              Gerrit-Reviewer: Matthias Körber <koe...@google.com>
              Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
              Gerrit-Attention: Matthias Körber <koe...@google.com>
              Gerrit-Attention: Salma Aly <salmaab...@google.com>
              Gerrit-Attention: David Bokan <bo...@chromium.org>
              Gerrit-Comment-Date: Thu, 23 Jul 2026 13:43:01 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              David Bokan (Gerrit)

              unread,
              Jul 23, 2026, 10:24:16 PM (18 hours ago) Jul 23
              to Salma Aly, Ioana Treib, Bekzhan Kassenov, Matthias Körber, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, browser-comp...@chromium.org, mfoltz+wa...@chromium.org
              Attention needed from Bekzhan Kassenov, Ioana Treib, Matthias Körber and Salma Aly

              David Bokan voted Code-Review+1

              Code-Review+1
              Open in Gerrit

              Related details

              Attention is currently required from:
              • Bekzhan Kassenov
              • Ioana Treib
              • Matthias Körber
              • Salma Aly
              Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement is not 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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
                Gerrit-Change-Number: 8107487
                Gerrit-PatchSet: 23
                Gerrit-Owner: Salma Aly <salmaab...@google.com>
                Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
                Gerrit-Reviewer: David Bokan <bo...@chromium.org>
                Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
                Gerrit-Reviewer: Matthias Körber <koe...@google.com>
                Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
                Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
                Gerrit-Attention: Matthias Körber <koe...@google.com>
                Gerrit-Attention: Salma Aly <salmaab...@google.com>
                Gerrit-Attention: Ioana Treib <ioa...@chromium.org>
                Gerrit-Comment-Date: Fri, 24 Jul 2026 02:24:01 +0000
                Gerrit-HasComments: No
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Matthias Körber (Gerrit)

                unread,
                2:42 AM (14 hours ago) 2:42 AM
                to Salma Aly, David Bokan, Ioana Treib, Bekzhan Kassenov, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, browser-comp...@chromium.org, mfoltz+wa...@chromium.org
                Attention needed from Bekzhan Kassenov, Ioana Treib and Salma Aly

                Matthias Körber voted Code-Review+1

                Code-Review+1
                Open in Gerrit

                Related details

                Attention is currently required from:
                • Bekzhan Kassenov
                • Ioana Treib
                • Salma Aly
                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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
                Gerrit-Change-Number: 8107487
                Gerrit-PatchSet: 23
                Gerrit-Owner: Salma Aly <salmaab...@google.com>
                Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
                Gerrit-Reviewer: David Bokan <bo...@chromium.org>
                Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
                Gerrit-Reviewer: Matthias Körber <koe...@google.com>
                Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
                Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
                Gerrit-Attention: Salma Aly <salmaab...@google.com>
                Gerrit-Attention: Ioana Treib <ioa...@chromium.org>
                Gerrit-Comment-Date: Fri, 24 Jul 2026 06:41:45 +0000
                Gerrit-HasComments: No
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Matthias Körber (Gerrit)

                unread,
                2:45 AM (13 hours ago) 2:45 AM
                to Salma Aly, David Bokan, Ioana Treib, Bekzhan Kassenov, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, browser-comp...@chromium.org, mfoltz+wa...@chromium.org
                Attention needed from Bekzhan Kassenov, Ioana Treib and Salma Aly

                Matthias Körber voted and added 1 comment

                Votes added by Matthias Körber

                Code-Review+0

                1 comment

                File components/one_time_tokens/core/browser/util/expiring_subscription_manager.cc
                Line 77, Patchset 23 (Latest): UpdateNextExpirationTimer();
                Matthias Körber . unresolved

                This was identified by AI and needs adressing:
                Calling `UpdateNextExpirationTimer()` after running external callbacks poses a use-after-free risk. If any of the `expiration_callbacks` destroys this manager instance, accessing `this` to update the timer will cause a crash.\n\nSince the expired subscriptions have already been removed from `subscriptions_` on line 70, you should move this `UpdateNextExpirationTimer()` call to be strictly before the loop that runs the callbacks.

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Bekzhan Kassenov
                • Ioana Treib
                • Salma Aly
                Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement is not 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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
                Gerrit-Change-Number: 8107487
                Gerrit-PatchSet: 23
                Gerrit-Owner: Salma Aly <salmaab...@google.com>
                Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
                Gerrit-Reviewer: David Bokan <bo...@chromium.org>
                Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
                Gerrit-Reviewer: Matthias Körber <koe...@google.com>
                Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
                Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
                Gerrit-Attention: Salma Aly <salmaab...@google.com>
                Gerrit-Attention: Ioana Treib <ioa...@chromium.org>
                Gerrit-Comment-Date: Fri, 24 Jul 2026 06:45:03 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Salma Aly (Gerrit)

                unread,
                2:55 AM (13 hours ago) 2:55 AM
                to Matthias Körber, David Bokan, Ioana Treib, Bekzhan Kassenov, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, browser-comp...@chromium.org, mfoltz+wa...@chromium.org
                Attention needed from Bekzhan Kassenov and Ioana Treib

                Salma Aly added 5 comments

                File chrome/browser/actor/tools/attempt_otp_filling_tool_browsertest.cc
                Line 434, Patchset 19: testing::_, testing::_))
                Ioana Treib . resolved

                `using testing::_ ;` at the top of the file and then you can write only `_` here.

                Salma Aly

                Done

                File chrome/browser/autofill/actor/one_time_tokens/actor_one_time_token_filling_service_impl.cc
                Line 283, Patchset 19: base::DoNothing());
                Ioana Treib . resolved

                Please add a param name comment.

                Salma Aly

                Done

                File components/autofill/core/browser/integrators/one_time_tokens/otp_manager_impl.cc
                Line 90, Patchset 19: base::DoNothing());
                Ioana Treib . resolved

                Please add a param name.

                Salma Aly

                Done

                File components/one_time_tokens/core/browser/one_time_token_service_impl_unittest.cc
                Line 654, Patchset 19: base::DoNothing());
                Ioana Treib . resolved

                Please add param comments here and everywhere else.

                Salma Aly

                Done

                File components/one_time_tokens/core/browser/util/expiring_subscription_manager.h
                Line 135, Patchset 19: base::OnceClosure expiration_callback = base::NullCallback()) {
                Ioana Treib . resolved

                Considering that you're now providing this callback from everywhere, should we get rid of the default value?

                Salma Aly

                yes, we can, but I didn't want to because we will need to change the test file and add all of those "DoNothing" callbacks to the subscriptions.

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Bekzhan Kassenov
                • Ioana Treib
                Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement is not 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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
                Gerrit-Change-Number: 8107487
                Gerrit-PatchSet: 23
                Gerrit-Owner: Salma Aly <salmaab...@google.com>
                Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
                Gerrit-Reviewer: David Bokan <bo...@chromium.org>
                Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
                Gerrit-Reviewer: Matthias Körber <koe...@google.com>
                Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
                Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
                Gerrit-Attention: Ioana Treib <ioa...@chromium.org>
                Gerrit-Comment-Date: Fri, 24 Jul 2026 06:55:11 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                Comment-In-Reply-To: Ioana Treib <ioa...@chromium.org>
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Ioana Treib (Gerrit)

                unread,
                5:03 AM (11 hours ago) 5:03 AM
                to Salma Aly, Matthias Körber, David Bokan, Bekzhan Kassenov, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, browser-comp...@chromium.org, mfoltz+wa...@chromium.org
                Attention needed from Bekzhan Kassenov and Salma Aly

                Ioana Treib voted and added 1 comment

                Votes added by Ioana Treib

                Code-Review+1

                1 comment

                Patchset-level comments
                File-level comment, Patchset 23 (Latest):
                Ioana Treib . resolved

                LGTM % Matthias' comment.

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Bekzhan Kassenov
                • Salma Aly
                Submit Requirements:
                  • requirement satisfiedCode-Coverage
                  • requirement is not 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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
                  Gerrit-Change-Number: 8107487
                  Gerrit-PatchSet: 23
                  Gerrit-Owner: Salma Aly <salmaab...@google.com>
                  Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
                  Gerrit-Reviewer: David Bokan <bo...@chromium.org>
                  Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
                  Gerrit-Reviewer: Matthias Körber <koe...@google.com>
                  Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
                  Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
                  Gerrit-Attention: Salma Aly <salmaab...@google.com>
                  Gerrit-Comment-Date: Fri, 24 Jul 2026 09:03:25 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: Yes
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Salma Aly (Gerrit)

                  unread,
                  5:20 AM (11 hours ago) 5:20 AM
                  to Ioana Treib, Matthias Körber, David Bokan, Bekzhan Kassenov, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, browser-comp...@chromium.org, mfoltz+wa...@chromium.org
                  Attention needed from Bekzhan Kassenov, David Bokan, Ioana Treib and Matthias Körber

                  Salma Aly added 1 comment

                  File components/one_time_tokens/core/browser/util/expiring_subscription_manager.cc
                  Line 77, Patchset 23: UpdateNextExpirationTimer();
                  Matthias Körber . resolved

                  This was identified by AI and needs adressing:
                  Calling `UpdateNextExpirationTimer()` after running external callbacks poses a use-after-free risk. If any of the `expiration_callbacks` destroys this manager instance, accessing `this` to update the timer will cause a crash.\n\nSince the expired subscriptions have already been removed from `subscriptions_` on line 70, you should move this `UpdateNextExpirationTimer()` call to be strictly before the loop that runs the callbacks.

                  Salma Aly

                  Done

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Bekzhan Kassenov
                  • David Bokan
                  • Ioana Treib
                  • Matthias Körber
                    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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
                      Gerrit-Change-Number: 8107487
                      Gerrit-PatchSet: 24
                      Gerrit-Owner: Salma Aly <salmaab...@google.com>
                      Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
                      Gerrit-Reviewer: David Bokan <bo...@chromium.org>
                      Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
                      Gerrit-Reviewer: Matthias Körber <koe...@google.com>
                      Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
                      Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
                      Gerrit-Attention: Matthias Körber <koe...@google.com>
                      Gerrit-Attention: David Bokan <bo...@chromium.org>
                      Gerrit-Attention: Ioana Treib <ioa...@chromium.org>
                      Gerrit-Comment-Date: Fri, 24 Jul 2026 09:20:19 +0000
                      Gerrit-HasComments: Yes
                      Gerrit-Has-Labels: No
                      Comment-In-Reply-To: Matthias Körber <koe...@google.com>
                      satisfied_requirement
                      unsatisfied_requirement
                      open
                      diffy

                      Ioana Treib (Gerrit)

                      unread,
                      5:47 AM (10 hours ago) 5:47 AM
                      to Salma Aly, Matthias Körber, David Bokan, Bekzhan Kassenov, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, browser-comp...@chromium.org, mfoltz+wa...@chromium.org
                      Attention needed from Bekzhan Kassenov, David Bokan, Matthias Körber and Salma Aly

                      Ioana Treib voted and added 1 comment

                      Votes added by Ioana Treib

                      Code-Review+1

                      1 comment

                      Patchset-level comments
                      Open in Gerrit

                      Related details

                      Attention is currently required from:
                      • Bekzhan Kassenov
                      • David Bokan
                      • Matthias Körber
                      • Salma Aly
                      Submit Requirements:
                        • requirement satisfiedCode-Coverage
                        • requirement is not 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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
                        Gerrit-Change-Number: 8107487
                        Gerrit-PatchSet: 25
                        Gerrit-Owner: Salma Aly <salmaab...@google.com>
                        Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
                        Gerrit-Reviewer: David Bokan <bo...@chromium.org>
                        Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
                        Gerrit-Reviewer: Matthias Körber <koe...@google.com>
                        Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
                        Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
                        Gerrit-Attention: Matthias Körber <koe...@google.com>
                        Gerrit-Attention: Salma Aly <salmaab...@google.com>
                        Gerrit-Attention: David Bokan <bo...@chromium.org>
                        Gerrit-Comment-Date: Fri, 24 Jul 2026 09:47:19 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: Yes
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Salma Aly (Gerrit)

                        unread,
                        7:48 AM (8 hours ago) 7:48 AM
                        to Norge Vizcay, Ioana Treib, David Bokan, Bekzhan Kassenov, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, browser-comp...@chromium.org, mfoltz+wa...@chromium.org
                        Attention needed from Bekzhan Kassenov, David Bokan and Norge Vizcay

                        Salma Aly added 1 comment

                        Patchset-level comments
                        Salma Aly . resolved

                        Norge I just need your owners approval on otp_manager_impl.cc

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Bekzhan Kassenov
                        • David Bokan
                        • Norge Vizcay
                        Submit Requirements:
                        • requirement satisfiedCode-Coverage
                        • requirement is not 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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
                        Gerrit-Change-Number: 8107487
                        Gerrit-PatchSet: 25
                        Gerrit-Owner: Salma Aly <salmaab...@google.com>
                        Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
                        Gerrit-Reviewer: David Bokan <bo...@chromium.org>
                        Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
                        Gerrit-Reviewer: Norge Vizcay <viz...@google.com>
                        Gerrit-Attention: David Bokan <bo...@chromium.org>
                        Gerrit-Attention: Norge Vizcay <viz...@google.com>
                        Gerrit-Comment-Date: Fri, 24 Jul 2026 11:48:08 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: No
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Norge Vizcay (Gerrit)

                        unread,
                        8:51 AM (7 hours ago) 8:51 AM
                        to Salma Aly, Ioana Treib, David Bokan, Bekzhan Kassenov, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, browser-comp...@chromium.org, mfoltz+wa...@chromium.org
                        Attention needed from Bekzhan Kassenov, David Bokan and Salma Aly

                        Norge Vizcay voted and added 1 comment

                        Votes added by Norge Vizcay

                        Code-Review+1

                        1 comment

                        Patchset-level comments
                        Norge Vizcay . resolved

                        `otp_manager_impl.cc` lgtm.

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Bekzhan Kassenov
                        • David Bokan
                        • Salma Aly
                        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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
                        Gerrit-Change-Number: 8107487
                        Gerrit-PatchSet: 25
                        Gerrit-Owner: Salma Aly <salmaab...@google.com>
                        Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
                        Gerrit-Reviewer: David Bokan <bo...@chromium.org>
                        Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
                        Gerrit-Reviewer: Norge Vizcay <viz...@google.com>
                        Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
                        Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
                        Gerrit-Attention: Salma Aly <salmaab...@google.com>
                        Gerrit-Attention: David Bokan <bo...@chromium.org>
                        Gerrit-Comment-Date: Fri, 24 Jul 2026 12:51:17 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: Yes
                        satisfied_requirement
                        open
                        diffy

                        Salma Aly (Gerrit)

                        unread,
                        9:08 AM (7 hours ago) 9:08 AM
                        to Norge Vizcay, Ioana Treib, David Bokan, Bekzhan Kassenov, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, browser-comp...@chromium.org, mfoltz+wa...@chromium.org
                        Attention needed from Bekzhan Kassenov and David Bokan

                        Salma Aly voted Commit-Queue+2

                        Commit-Queue+2
                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Bekzhan Kassenov
                        • David Bokan
                        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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
                        Gerrit-Change-Number: 8107487
                        Gerrit-PatchSet: 25
                        Gerrit-Owner: Salma Aly <salmaab...@google.com>
                        Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
                        Gerrit-Reviewer: David Bokan <bo...@chromium.org>
                        Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
                        Gerrit-Reviewer: Norge Vizcay <viz...@google.com>
                        Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
                        Gerrit-Attention: Bekzhan Kassenov <bkas...@google.com>
                        Gerrit-Attention: David Bokan <bo...@chromium.org>
                        Gerrit-Comment-Date: Fri, 24 Jul 2026 13:08:31 +0000
                        Gerrit-HasComments: No
                        Gerrit-Has-Labels: Yes
                        satisfied_requirement
                        open
                        diffy

                        Chromium LUCI CQ (Gerrit)

                        unread,
                        9:14 AM (7 hours ago) 9:14 AM
                        to Salma Aly, Norge Vizcay, Ioana Treib, David Bokan, Bekzhan Kassenov, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, dewitt...@chromium.org, browser-comp...@chromium.org, mfoltz+wa...@chromium.org

                        Chromium LUCI CQ submitted the change

                        Change information

                        Commit message:
                        [Otp4Bd] Introduce expiration closure to Subscription Manager

                        The OneTimeTokenServiceImpl currently handles subscriptions to OTPs
                        (both SMS and Gmail) via the generic ExpiringSubscriptionManager. When a
                        subscription reaches its timeout, it is silently dropped. This works
                        fine for SMS, but leaves Gmail OTP fillers (like the
                        AttemptOtpFillingTool) hanging indefinitely because no explicit action
                        result is reported back.

                        To fix this, this CL introduces an optional `expiration_callback` to
                        `ExpiringSubscriptionManager::Subscribe()`. If provided, the manager
                        will run it when the subscription is purged during
                        `ProcessExpirations()`.

                        In the next commit, we will add an expiration callback from the Gmail
                        caller.

                        Bug: b:530535640 TAG=agy
                        Change-Id: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
                        Reviewed-by: Ioana Treib <ioa...@chromium.org>
                        Reviewed-by: Norge Vizcay <viz...@google.com>
                        Commit-Queue: Salma Aly <salmaab...@google.com>
                        Cr-Commit-Position: refs/heads/main@{#1667816}
                        Files:
                        • M chrome/browser/actor/tools/attempt_otp_filling_tool_browsertest.cc
                        • M chrome/browser/autofill/actor/one_time_tokens/actor_one_time_token_filling_service_impl.cc
                        • M chrome/browser/autofill/actor/one_time_tokens/actor_one_time_token_filling_service_impl_unittest.cc
                        • M chrome/browser/glic/actor/glic_actor_attempt_otp_filling_browsertest.cc
                        • M components/autofill/core/browser/integrators/one_time_tokens/otp_manager_impl.cc
                        • M components/one_time_tokens/core/browser/gmail_otp_backend.cc
                        • M components/one_time_tokens/core/browser/mock_one_time_token_service.h
                        • M components/one_time_tokens/core/browser/one_time_token_service.h
                        • M components/one_time_tokens/core/browser/one_time_token_service_impl.cc
                        • M components/one_time_tokens/core/browser/one_time_token_service_impl.h
                        • M components/one_time_tokens/core/browser/one_time_token_service_impl_unittest.cc
                        • M components/one_time_tokens/core/browser/util/expiring_subscription_manager.cc
                        • M components/one_time_tokens/core/browser/util/expiring_subscription_manager.h
                        • M components/one_time_tokens/core/browser/util/expiring_subscription_manager_unittest.cc
                        Change size: L
                        Delta: 14 files changed, 226 insertions(+), 97 deletions(-)
                        Branch: refs/heads/main
                        Submit Requirements:
                        • requirement satisfiedCode-Review: +1 by Norge Vizcay, +1 by Ioana Treib
                        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: I7afab309c4cfa16d36e4c27aff4f7ec2f90deeda
                        Gerrit-Change-Number: 8107487
                        Gerrit-PatchSet: 26
                        Gerrit-Owner: Salma Aly <salmaab...@google.com>
                        Gerrit-Reviewer: Bekzhan Kassenov <bkas...@google.com>
                        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
                        Gerrit-Reviewer: David Bokan <bo...@chromium.org>
                        Gerrit-Reviewer: Ioana Treib <ioa...@chromium.org>
                        Gerrit-Reviewer: Norge Vizcay <viz...@google.com>
                        Gerrit-Reviewer: Salma Aly <salmaab...@google.com>
                        open
                        diffy
                        satisfied_requirement
                        Reply all
                        Reply to author
                        Forward
                        0 new messages