[Memory] Introduce AtMemoryPromoDetector to catch cross-tab copy-paste [chromium/src : main]

0 views
Skip to first unread message

Maryia Mankevich (Gerrit)

unread,
Apr 10, 2026, 8:25:17 AM (7 days ago) Apr 10
to Mirko Bonadei, Jerome Jiang, Jason Hu, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, derinel+wat...@google.com, ios-r...@chromium.org, webauthn...@chromium.org, browser-comp...@chromium.org, fgal...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, net-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, jz...@chromium.org, dfried...@chromium.org, estali...@chromium.org
Attention needed from Christoph Schwering

Maryia Mankevich added 1 comment

Patchset-level comments
File-level comment, Patchset 39 (Latest):
Maryia Mankevich . resolved
Hi Christoph,                                                                                                                             
I dropped the contextual_tasks dependency, moved the code to chrome/browser/ui/autofill and started to use the IPH framework for bubble triggering.

Could you please take a look?
Open in Gerrit

Related details

Attention is currently required from:
  • Christoph Schwering
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: I3eeca33fd8491d7b296de280cb2325e205d5413a
Gerrit-Change-Number: 7726066
Gerrit-PatchSet: 39
Gerrit-Owner: Maryia Mankevich <mma...@google.com>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Maryia Mankevich <mma...@google.com>
Gerrit-CC: Jason Hu <huja...@google.com>
Gerrit-CC: Jerome Jiang <ji...@chromium.org>
Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
Gerrit-Attention: Christoph Schwering <schw...@google.com>
Gerrit-Comment-Date: Fri, 10 Apr 2026 12:25:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Adem Derinel (Gerrit)

unread,
Apr 10, 2026, 8:34:45 AM (7 days ago) Apr 10
to Maryia Mankevich, derinel+wat...@google.com, Mirko Bonadei, Jerome Jiang, Jason Hu, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, ios-r...@chromium.org, webauthn...@chromium.org, browser-comp...@chromium.org, fgal...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, net-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, jz...@chromium.org, dfried...@chromium.org, estali...@chromium.org
Attention needed from Christoph Schwering

Adem Derinel removed derinel+wat...@google.com from this change

Deleted Reviewers:
Open in Gerrit

Related details

Attention is currently required from:
  • Christoph Schwering
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: deleteReviewer
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I3eeca33fd8491d7b296de280cb2325e205d5413a
Gerrit-Change-Number: 7726066
Gerrit-PatchSet: 40
satisfied_requirement
unsatisfied_requirement
open
diffy

Christoph Schwering (Gerrit)

unread,
Apr 12, 2026, 8:59:14 PM (4 days ago) Apr 12
to Maryia Mankevich, Mirko Bonadei, Jerome Jiang, Jason Hu, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, ios-r...@chromium.org, webauthn...@chromium.org, browser-comp...@chromium.org, fgal...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, net-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, jz...@chromium.org, dfried...@chromium.org, estali...@chromium.org
Attention needed from Maryia Mankevich

Christoph Schwering added 9 comments

File chrome/browser/ui/autofill/autofill_at_memory_promo_detector.h
Line 53, Patchset 40 (Latest): raw_ptr<Profile> profile_;
Christoph Schwering . unresolved

nit: raw_ref?

Line 46, Patchset 40 (Latest):
Christoph Schwering . unresolved

nit: remove blank line

File chrome/browser/ui/autofill/autofill_at_memory_promo_detector.cc
Line 28, Patchset 40 (Latest): "ActiveTabChanged",
"Copy",
"ActiveTabChanged",
"Paste",
Christoph Schwering . unresolved

Where do these string constants come from? Shouldn't this be an enum?

Line 26, Patchset 40 (Latest):const std::vector<std::string>& GetTargetSequence() {
static const base::NoDestructor<std::vector<std::string>> kTargetSequence({
"ActiveTabChanged",
"Copy",
"ActiveTabChanged",
"Paste",
});
return *kTargetSequence;
}
Christoph Schwering . unresolved

nit:
```
constexpr const char* kTargetSequence[] = ...;
```
?

Line 56, Patchset 40 (Latest): if (!profile_) return;
Christoph Schwering . unresolved

Code formatting is off. This should be caught by a presubmit script. Did you see a warning when you uploaded the CL? If not, could you file a bug or reopen an existing one (maybe b/386840832)?

Line 66, Patchset 40 (Latest): const std::string& action,
Christoph Schwering . unresolved

std::string_view?

Line 69, Patchset 40 (Latest): for (const auto& target : GetTargetSequence()) {
Christoph Schwering . unresolved

nit: spell out the type

Line 68, Patchset 40 (Latest): bool relevant = false;
for (const auto& target : GetTargetSequence()) {
if (action == target) {
relevant = true;
break;
}
}
Christoph Schwering . unresolved

nit: `bool relevant = base::Contains(...)`?

Line 108, Patchset 40 (Latest): for (size_t i = 0; i < GetTargetSequence().size(); ++i) {
Christoph Schwering . unresolved

nit: use base::zip()

Open in Gerrit

Related details

Attention is currently required from:
  • Maryia Mankevich
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: I3eeca33fd8491d7b296de280cb2325e205d5413a
    Gerrit-Change-Number: 7726066
    Gerrit-PatchSet: 40
    Gerrit-Owner: Maryia Mankevich <mma...@google.com>
    Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
    Gerrit-Reviewer: Maryia Mankevich <mma...@google.com>
    Gerrit-CC: Jason Hu <huja...@google.com>
    Gerrit-CC: Jerome Jiang <ji...@chromium.org>
    Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
    Gerrit-Attention: Maryia Mankevich <mma...@google.com>
    Gerrit-Comment-Date: Mon, 13 Apr 2026 00:58:55 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Maryia Mankevich (Gerrit)

    unread,
    Apr 13, 2026, 12:09:16 PM (4 days ago) Apr 13
    to Mirko Bonadei, chromiu...@luci-project-accounts.iam.gserviceaccount.com, chromium...@chromium.org, boujan...@google.com, mercer...@google.com, blink-rev...@chromium.org, aashna...@google.com, tranbaod...@chromium.org, nektar...@chromium.org, yhanad...@chromium.org, lucasrada...@google.com, performance-m...@chromium.org, abigailbk...@google.com, cbe-cep-eng...@google.com, blink-...@chromium.org, kyungjunle...@google.com, keithle...@chromium.org, bnc+...@chromium.org, android-web...@chromium.org, yuzo+...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, chromium-a...@chromium.org, stanfie...@google.com, francisjp...@google.com, niharm...@google.com, shuche...@chromium.org, dewitt...@chromium.org, dullweb...@chromium.org, josiah...@chromium.org, mfoltz+wa...@chromium.org, lens-chrome...@google.com, nona+...@chromium.org, omnibox-...@chromium.org, msrame...@chromium.org, chrstn...@google.com, ios-r...@chromium.org, webauthn...@chromium.org, browser-comp...@chromium.org, fgal...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, net-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, jz...@chromium.org, dfried...@chromium.org, estali...@chromium.org

    Maryia Mankevich added 3 comments

    File chrome/browser/ui/autofill/autofill_at_memory_promo_detector.cc
    Line 28, Patchset 40: "ActiveTabChanged",

    "Copy",
    "ActiveTabChanged",
    "Paste",
    Christoph Schwering . unresolved

    Where do these string constants come from? Shouldn't this be an enum?

    Maryia Mankevich

    I originally used strings to match the names in actions.xml, but since I'm just passing events directly from the TabHelper and not using ActionObserver, I don't actually need these strings.
    I've refactored it to use enum instead.

    Line 26, Patchset 40:const std::vector<std::string>& GetTargetSequence() {

    static const base::NoDestructor<std::vector<std::string>> kTargetSequence({
    "ActiveTabChanged",
    "Copy",
    "ActiveTabChanged",
    "Paste",
    });
    return *kTargetSequence;
    }
    Christoph Schwering . unresolved

    nit:
    ```
    constexpr const char* kTargetSequence[] = ...;
    ```
    ?

    Maryia Mankevich

    I replaced the strings by enums as discussed in the other thread.

    Line 56, Patchset 40: if (!profile_) return;
    Christoph Schwering . unresolved

    Code formatting is off. This should be caught by a presubmit script. Did you see a warning when you uploaded the CL? If not, could you file a bug or reopen an existing one (maybe b/386840832)?

    Maryia Mankevich

    I used the Gemini CLI to upload this CL, and it appears it automatically ran `git cl upload -f`, which bypassed the presubmit warnings. I've now formatted the code and manually verified that all presubmit checks pass.
    Apologies for uploading unformatted files earlier.

    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 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: I3eeca33fd8491d7b296de280cb2325e205d5413a
    Gerrit-Change-Number: 7726066
    Gerrit-PatchSet: 42
    Gerrit-Owner: Maryia Mankevich <mma...@google.com>
    Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
    Gerrit-Reviewer: Maryia Mankevich <mma...@google.com>
    Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
    Gerrit-Comment-Date: Mon, 13 Apr 2026 16:08:58 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Christoph Schwering <schw...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Maryia Mankevich (Gerrit)

    unread,
    Apr 14, 2026, 1:30:54 AM (3 days ago) Apr 14
    to Mirko Bonadei, chromiu...@luci-project-accounts.iam.gserviceaccount.com, chromium...@chromium.org, boujan...@google.com, mercer...@google.com, blink-rev...@chromium.org, aashna...@google.com, tranbaod...@chromium.org, nektar...@chromium.org, yhanad...@chromium.org, lucasrada...@google.com, performance-m...@chromium.org, abigailbk...@google.com, cbe-cep-eng...@google.com, blink-...@chromium.org, kyungjunle...@google.com, keithle...@chromium.org, bnc+...@chromium.org, android-web...@chromium.org, yuzo+...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, chromium-a...@chromium.org, stanfie...@google.com, francisjp...@google.com, niharm...@google.com, shuche...@chromium.org, dewitt...@chromium.org, dullweb...@chromium.org, josiah...@chromium.org, mfoltz+wa...@chromium.org, lens-chrome...@google.com, nona+...@chromium.org, omnibox-...@chromium.org, msrame...@chromium.org, chrstn...@google.com, ios-r...@chromium.org, webauthn...@chromium.org, browser-comp...@chromium.org, fgal...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, net-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, jz...@chromium.org, dfried...@chromium.org, estali...@chromium.org
    Attention needed from Christoph Schwering

    Maryia Mankevich added 7 comments

    Patchset-level comments
    File-level comment, Patchset 47 (Latest):
    Maryia Mankevich . resolved

    Thanks! Updated. PTAL.

    File chrome/browser/ui/autofill/autofill_at_memory_promo_detector.h
    Line 53, Patchset 40: raw_ptr<Profile> profile_;
    Christoph Schwering . unresolved

    nit: raw_ref?

    Maryia Mankevich

    I ended up removing `profile_` entirely.
    I was originally storing it to call `chrome::FindBrowserWithProfile()`, but the presubmit flagged that function as a banned anti-pattern (since it can return the wrong window if the user has multiple windows open for the same profile).

    Line 46, Patchset 40:
    Christoph Schwering . resolved

    nit: remove blank line

    Maryia Mankevich

    Done

    File chrome/browser/ui/autofill/autofill_at_memory_promo_detector.cc
    Line 66, Patchset 40: const std::string& action,
    Christoph Schwering . resolved

    std::string_view?

    Maryia Mankevich

    Replaced by enum.

    Line 69, Patchset 40: for (const auto& target : GetTargetSequence()) {
    Christoph Schwering . resolved

    nit: spell out the type

    Maryia Mankevich

    removed since I started to use `base::Contains`.

    Line 68, Patchset 40: bool relevant = false;

    for (const auto& target : GetTargetSequence()) {
    if (action == target) {
    relevant = true;
    break;
    }
    }
    Christoph Schwering . resolved

    nit: `bool relevant = base::Contains(...)`?

    Maryia Mankevich

    Done

    Line 108, Patchset 40: for (size_t i = 0; i < GetTargetSequence().size(); ++i) {
    Christoph Schwering . unresolved

    nit: use base::zip()

    Maryia Mankevich

    It looks like using `std::ranges::equal` in `CheckSequence` is even better than loop with `base::zip()`. WDYT?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Christoph Schwering
    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: I3eeca33fd8491d7b296de280cb2325e205d5413a
    Gerrit-Change-Number: 7726066
    Gerrit-PatchSet: 47
    Gerrit-Owner: Maryia Mankevich <mma...@google.com>
    Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
    Gerrit-Reviewer: Maryia Mankevich <mma...@google.com>
    Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
    Gerrit-Attention: Christoph Schwering <schw...@google.com>
    Gerrit-Comment-Date: Tue, 14 Apr 2026 05:30:33 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Christoph Schwering (Gerrit)

    unread,
    Apr 14, 2026, 6:26:01 AM (3 days ago) Apr 14
    to Maryia Mankevich, Mirko Bonadei, chromiu...@luci-project-accounts.iam.gserviceaccount.com, chromium...@chromium.org, boujan...@google.com, mercer...@google.com, blink-rev...@chromium.org, aashna...@google.com, tranbaod...@chromium.org, nektar...@chromium.org, yhanad...@chromium.org, lucasrada...@google.com, performance-m...@chromium.org, abigailbk...@google.com, cbe-cep-eng...@google.com, blink-...@chromium.org, kyungjunle...@google.com, keithle...@chromium.org, bnc+...@chromium.org, android-web...@chromium.org, yuzo+...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, chromium-a...@chromium.org, stanfie...@google.com, francisjp...@google.com, niharm...@google.com, shuche...@chromium.org, dewitt...@chromium.org, dullweb...@chromium.org, josiah...@chromium.org, mfoltz+wa...@chromium.org, lens-chrome...@google.com, nona+...@chromium.org, omnibox-...@chromium.org, msrame...@chromium.org, chrstn...@google.com, ios-r...@chromium.org, webauthn...@chromium.org, browser-comp...@chromium.org, fgal...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, net-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, jz...@chromium.org, dfried...@chromium.org, estali...@chromium.org
    Attention needed from Maryia Mankevich

    Christoph Schwering added 6 comments

    File chrome/browser/ui/autofill/autofill_at_memory_promo_detector.h
    Line 27, Patchset 47 (Latest): AutofillAtMemoryPromoDetector(const AutofillAtMemoryPromoDetector&) = delete;
    AutofillAtMemoryPromoDetector& operator=(
    const AutofillAtMemoryPromoDetector&) = delete;
    Christoph Schwering . unresolved

    Move above destructor go/cstyle#Declaration_Order

    File chrome/browser/ui/autofill/autofill_at_memory_promo_detector.cc
    Line 28, Patchset 40: "ActiveTabChanged",
    "Copy",
    "ActiveTabChanged",
    "Paste",
    Christoph Schwering . resolved

    Where do these string constants come from? Shouldn't this be an enum?

    Maryia Mankevich

    I originally used strings to match the names in actions.xml, but since I'm just passing events directly from the TabHelper and not using ActionObserver, I don't actually need these strings.
    I've refactored it to use enum instead.

    Christoph Schwering

    Acknowledged

    Line 26, Patchset 40:const std::vector<std::string>& GetTargetSequence() {
    static const base::NoDestructor<std::vector<std::string>> kTargetSequence({
    "ActiveTabChanged",
    "Copy",
    "ActiveTabChanged",
    "Paste",
    });
    return *kTargetSequence;
    }
    Christoph Schwering . resolved

    nit:


    ```
    constexpr const char* kTargetSequence[] = ...;
    ```
    ?

    Maryia Mankevich

    I replaced the strings by enums as discussed in the other thread.

    Christoph Schwering

    Acknowledged

    Line 26, Patchset 47 (Latest):const std::vector<AutofillAtMemoryPromoDetector::Action>& GetTargetSequence() {
    static const base::NoDestructor<
    std::vector<AutofillAtMemoryPromoDetector::Action>>
    kTargetSequence({
    AutofillAtMemoryPromoDetector::Action::kActiveTabChanged,
    AutofillAtMemoryPromoDetector::Action::kCopy,
    AutofillAtMemoryPromoDetector::Action::kActiveTabChanged,
    AutofillAtMemoryPromoDetector::Action::kPaste,
    });
    return *kTargetSequence;
    }
    Christoph Schwering . unresolved
    Use `std::array`, e.g.,
    ```
    static constexpr auto kTargetSequence =
    std::to_array<AutofillAtMemoryPromoDetector::Action>({
    AutofillAtMemoryPromoDetector::Action::kActiveTabChanged,
    AutofillAtMemoryPromoDetector::Action::kCopy,
    AutofillAtMemoryPromoDetector::Action::kActiveTabChanged,
    AutofillAtMemoryPromoDetector::Action::kPaste});
    ```
    Line 56, Patchset 40: if (!profile_) return;
    Christoph Schwering . unresolved

    Code formatting is off. This should be caught by a presubmit script. Did you see a warning when you uploaded the CL? If not, could you file a bug or reopen an existing one (maybe b/386840832)?

    Maryia Mankevich

    I used the Gemini CLI to upload this CL, and it appears it automatically ran `git cl upload -f`, which bypassed the presubmit warnings. I've now formatted the code and manually verified that all presubmit checks pass.
    Apologies for uploading unformatted files earlier.

    Christoph Schwering

    Thanks! Could you file a bug?

    Line 108, Patchset 40: for (size_t i = 0; i < GetTargetSequence().size(); ++i) {
    Christoph Schwering . resolved

    nit: use base::zip()

    Maryia Mankevich

    It looks like using `std::ranges::equal` in `CheckSequence` is even better than loop with `base::zip()`. WDYT?

    Christoph Schwering

    I agree, thanks!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Maryia Mankevich
    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: I3eeca33fd8491d7b296de280cb2325e205d5413a
    Gerrit-Change-Number: 7726066
    Gerrit-PatchSet: 47
    Gerrit-Owner: Maryia Mankevich <mma...@google.com>
    Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
    Gerrit-Reviewer: Maryia Mankevich <mma...@google.com>
    Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
    Gerrit-Attention: Maryia Mankevich <mma...@google.com>
    Gerrit-Comment-Date: Tue, 14 Apr 2026 10:25:47 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Maryia Mankevich <mma...@google.com>
    Comment-In-Reply-To: Christoph Schwering <schw...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Christoph Schwering (Gerrit)

    unread,
    Apr 14, 2026, 6:33:24 AM (3 days ago) Apr 14
    to Maryia Mankevich, Mirko Bonadei, chromiu...@luci-project-accounts.iam.gserviceaccount.com, chromium...@chromium.org, boujan...@google.com, mercer...@google.com, blink-rev...@chromium.org, aashna...@google.com, tranbaod...@chromium.org, nektar...@chromium.org, yhanad...@chromium.org, lucasrada...@google.com, performance-m...@chromium.org, abigailbk...@google.com, cbe-cep-eng...@google.com, blink-...@chromium.org, kyungjunle...@google.com, keithle...@chromium.org, bnc+...@chromium.org, android-web...@chromium.org, yuzo+...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, chromium-a...@chromium.org, stanfie...@google.com, francisjp...@google.com, niharm...@google.com, shuche...@chromium.org, dewitt...@chromium.org, dullweb...@chromium.org, josiah...@chromium.org, mfoltz+wa...@chromium.org, lens-chrome...@google.com, nona+...@chromium.org, omnibox-...@chromium.org, msrame...@chromium.org, chrstn...@google.com, ios-r...@chromium.org, webauthn...@chromium.org, browser-comp...@chromium.org, fgal...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, net-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, jz...@chromium.org, dfried...@chromium.org, estali...@chromium.org
    Attention needed from Maryia Mankevich

    Christoph Schwering added 1 comment

    File chrome/browser/ui/autofill/autofill_at_memory_promo_detector.cc
    Line 85, Patchset 47 (Latest): std::equal_to<Action>(), &ActionRecord::action)) {
    Christoph Schwering . unresolved

    Remove?

    Gerrit-Comment-Date: Tue, 14 Apr 2026 10:33:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Maryia Mankevich (Gerrit)

    unread,
    Apr 14, 2026, 9:19:02 AM (3 days ago) Apr 14
    to Mirko Bonadei, chromiu...@luci-project-accounts.iam.gserviceaccount.com, chromium...@chromium.org, boujan...@google.com, mercer...@google.com, blink-rev...@chromium.org, aashna...@google.com, tranbaod...@chromium.org, nektar...@chromium.org, yhanad...@chromium.org, lucasrada...@google.com, performance-m...@chromium.org, abigailbk...@google.com, cbe-cep-eng...@google.com, blink-...@chromium.org, kyungjunle...@google.com, keithle...@chromium.org, bnc+...@chromium.org, android-web...@chromium.org, yuzo+...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, chromium-a...@chromium.org, stanfie...@google.com, francisjp...@google.com, niharm...@google.com, shuche...@chromium.org, dewitt...@chromium.org, dullweb...@chromium.org, josiah...@chromium.org, mfoltz+wa...@chromium.org, lens-chrome...@google.com, nona+...@chromium.org, omnibox-...@chromium.org, msrame...@chromium.org, chrstn...@google.com, ios-r...@chromium.org, webauthn...@chromium.org, browser-comp...@chromium.org, fgal...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, net-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, jz...@chromium.org, dfried...@chromium.org, estali...@chromium.org
    Attention needed from Christoph Schwering

    Maryia Mankevich added 5 comments

    Patchset-level comments
    File-level comment, Patchset 48 (Latest):
    Maryia Mankevich . resolved

    Updated. PTAL.

    File chrome/browser/ui/autofill/autofill_at_memory_promo_detector.h
    Line 27, Patchset 47: AutofillAtMemoryPromoDetector(const AutofillAtMemoryPromoDetector&) = delete;

    AutofillAtMemoryPromoDetector& operator=(
    const AutofillAtMemoryPromoDetector&) = delete;
    Christoph Schwering . resolved

    Move above destructor go/cstyle#Declaration_Order

    Maryia Mankevich

    Done

    File chrome/browser/ui/autofill/autofill_at_memory_promo_detector.cc
    Line 26, Patchset 47:const std::vector<AutofillAtMemoryPromoDetector::Action>& GetTargetSequence() {

    static const base::NoDestructor<
    std::vector<AutofillAtMemoryPromoDetector::Action>>
    kTargetSequence({
    AutofillAtMemoryPromoDetector::Action::kActiveTabChanged,
    AutofillAtMemoryPromoDetector::Action::kCopy,
    AutofillAtMemoryPromoDetector::Action::kActiveTabChanged,
    AutofillAtMemoryPromoDetector::Action::kPaste,
    });
    return *kTargetSequence;
    }
    Christoph Schwering . resolved
    Use `std::array`, e.g.,
    ```
    static constexpr auto kTargetSequence =
    std::to_array<AutofillAtMemoryPromoDetector::Action>({
    AutofillAtMemoryPromoDetector::Action::kActiveTabChanged,
    AutofillAtMemoryPromoDetector::Action::kCopy,
    AutofillAtMemoryPromoDetector::Action::kActiveTabChanged,
    AutofillAtMemoryPromoDetector::Action::kPaste});
    ```
    Maryia Mankevich

    Done

    Line 56, Patchset 40: if (!profile_) return;
    Christoph Schwering . unresolved

    Code formatting is off. This should be caught by a presubmit script. Did you see a warning when you uploaded the CL? If not, could you file a bug or reopen an existing one (maybe b/386840832)?

    Maryia Mankevich

    I used the Gemini CLI to upload this CL, and it appears it automatically ran `git cl upload -f`, which bypassed the presubmit warnings. I've now formatted the code and manually verified that all presubmit checks pass.
    Apologies for uploading unformatted files earlier.

    Christoph Schwering

    Thanks! Could you file a bug?

    Maryia Mankevich

    Do you mean filing a bug for the Gemini CLI team? I'm not sure if it's considered a bug, since the result depends on the prompt (I can just ask Gemini explicitly not to use -f when uploading).

    Line 85, Patchset 47: std::equal_to<Action>(), &ActionRecord::action)) {
    Christoph Schwering . unresolved

    Remove?

    Maryia Mankevich

    I couldn't remove it completely because I need to pass the projection (&ActionRecord::action) as the 4th argument, since I am comparing a collection of structs against a collection of enums. I can replace it with {}. Did this for now. PTAL.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Christoph Schwering
    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: I3eeca33fd8491d7b296de280cb2325e205d5413a
    Gerrit-Change-Number: 7726066
    Gerrit-PatchSet: 48
    Gerrit-Owner: Maryia Mankevich <mma...@google.com>
    Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
    Gerrit-Reviewer: Maryia Mankevich <mma...@google.com>
    Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
    Gerrit-Attention: Christoph Schwering <schw...@google.com>
    Gerrit-Comment-Date: Tue, 14 Apr 2026 13:18:48 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Christoph Schwering (Gerrit)

    unread,
    Apr 14, 2026, 10:12:41 AM (3 days ago) Apr 14
    to Maryia Mankevich, Mirko Bonadei, chromiu...@luci-project-accounts.iam.gserviceaccount.com, chromium...@chromium.org, boujan...@google.com, mercer...@google.com, blink-rev...@chromium.org, aashna...@google.com, tranbaod...@chromium.org, nektar...@chromium.org, yhanad...@chromium.org, lucasrada...@google.com, performance-m...@chromium.org, abigailbk...@google.com, cbe-cep-eng...@google.com, blink-...@chromium.org, kyungjunle...@google.com, keithle...@chromium.org, bnc+...@chromium.org, android-web...@chromium.org, yuzo+...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, chromium-a...@chromium.org, stanfie...@google.com, francisjp...@google.com, niharm...@google.com, shuche...@chromium.org, dewitt...@chromium.org, dullweb...@chromium.org, josiah...@chromium.org, mfoltz+wa...@chromium.org, lens-chrome...@google.com, nona+...@chromium.org, omnibox-...@chromium.org, msrame...@chromium.org, chrstn...@google.com, ios-r...@chromium.org, webauthn...@chromium.org, browser-comp...@chromium.org, fgal...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, net-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, jz...@chromium.org, dfried...@chromium.org, estali...@chromium.org
    Attention needed from Maryia Mankevich

    Christoph Schwering added 2 comments

    File chrome/browser/ui/autofill/autofill_at_memory_promo_detector.cc
    Line 85, Patchset 47: std::equal_to<Action>(), &ActionRecord::action)) {
    Christoph Schwering . resolved

    Remove?

    Maryia Mankevich

    I couldn't remove it completely because I need to pass the projection (&ActionRecord::action) as the 4th argument, since I am comparing a collection of structs against a collection of enums. I can replace it with {}. Did this for now. PTAL.

    Christoph Schwering

    Makes sense, thanks!

    File chrome/browser/ui/tab_helpers.cc
    Line 316, Patchset 48 (Latest):// WARNING: Do not use this class for desktop chrome. Use TabFeatures instead.
    // See
    // https://chromium.googlesource.com/chromium/src/+/main/docs/chrome_browser_design_principles.md
    void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
    Christoph Schwering . unresolved

    Note this. (Sorry I had missed this earlier.)

    But I'm wondering if we really need a KeyedService + TabFeature for this. Can we just make it a member of ChromeAutofillClient to save a lot of boilerplate code?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Maryia Mankevich
    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: I3eeca33fd8491d7b296de280cb2325e205d5413a
    Gerrit-Change-Number: 7726066
    Gerrit-PatchSet: 48
    Gerrit-Owner: Maryia Mankevich <mma...@google.com>
    Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
    Gerrit-Reviewer: Maryia Mankevich <mma...@google.com>
    Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
    Gerrit-Attention: Maryia Mankevich <mma...@google.com>
    Gerrit-Comment-Date: Tue, 14 Apr 2026 14:12:25 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Maryia Mankevich (Gerrit)

    unread,
    Apr 14, 2026, 12:43:34 PM (3 days ago) Apr 14
    to Mirko Bonadei, chromiu...@luci-project-accounts.iam.gserviceaccount.com, chromium...@chromium.org, boujan...@google.com, mercer...@google.com, blink-rev...@chromium.org, aashna...@google.com, tranbaod...@chromium.org, nektar...@chromium.org, yhanad...@chromium.org, lucasrada...@google.com, performance-m...@chromium.org, abigailbk...@google.com, cbe-cep-eng...@google.com, blink-...@chromium.org, kyungjunle...@google.com, keithle...@chromium.org, bnc+...@chromium.org, android-web...@chromium.org, yuzo+...@chromium.org, dtseng...@chromium.org, extension...@chromium.org, chromium-a...@chromium.org, stanfie...@google.com, francisjp...@google.com, niharm...@google.com, shuche...@chromium.org, dewitt...@chromium.org, dullweb...@chromium.org, josiah...@chromium.org, mfoltz+wa...@chromium.org, lens-chrome...@google.com, nona+...@chromium.org, omnibox-...@chromium.org, msrame...@chromium.org, chrstn...@google.com, ios-r...@chromium.org, webauthn...@chromium.org, browser-comp...@chromium.org, fgal...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, net-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, jz...@chromium.org, dfried...@chromium.org, estali...@chromium.org
    Attention needed from Christoph Schwering

    Maryia Mankevich added 1 comment

    File chrome/browser/ui/tab_helpers.cc
    Line 316, Patchset 48 (Latest):// WARNING: Do not use this class for desktop chrome. Use TabFeatures instead.
    // See
    // https://chromium.googlesource.com/chromium/src/+/main/docs/chrome_browser_design_principles.md
    void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
    Christoph Schwering . unresolved

    Note this. (Sorry I had missed this earlier.)

    But I'm wondering if we really need a KeyedService + TabFeature for this. Can we just make it a member of ChromeAutofillClient to save a lot of boilerplate code?

    Maryia Mankevich

    Great point on the boilerplate!
    Since this needs to track a sequence across different tabs, I think it can't live entirely in `ChromeAutofillClient`.
    To simplify things, i'll try to do it using `PersonalDataManager` instead of my custom `KeyedSevice` and `ChromeAutofillClient` instead of my custom `TabHelper`.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Christoph Schwering
    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: I3eeca33fd8491d7b296de280cb2325e205d5413a
    Gerrit-Change-Number: 7726066
    Gerrit-PatchSet: 48
    Gerrit-Owner: Maryia Mankevich <mma...@google.com>
    Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
    Gerrit-Reviewer: Maryia Mankevich <mma...@google.com>
    Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
    Gerrit-Attention: Christoph Schwering <schw...@google.com>
    Gerrit-Comment-Date: Tue, 14 Apr 2026 16:43:15 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Christoph Schwering <schw...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages