[EVP] Verify emails and dispatch "verifiedemail" events in autofill [chromium/src : main]

0 views
Skip to first unread message

Sam Goto (Gerrit)

unread,
Sep 15, 2025, 7:31:35 PM (9 days ago) Sep 15
to Jihad Hanna, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Jihad Hanna

Sam Goto added 2 comments

File components/autofill/content/browser/email_verifier_observer.cc
Line 22, Patchset 13 (Latest):void EmailVerifierObserver::OnFillOrPreviewForm(
Sam Goto . unresolved

TODO: add unit tests in this CL once I get a signal from reviewers that this is the right code structure.

File content/browser/webid/delegation/email_verification_request.cc
Line 286, Patchset 13 (Latest):EmailVerifier* EmailVerifier::GetOrCreateForFrame(
Sam Goto . unresolved

TODO: move this to another and independent CL once I get the signal from reviewers that this is the right code structure.

Open in Gerrit

Related details

Attention is currently required from:
  • Jihad Hanna
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 13
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Comment-Date: Mon, 15 Sep 2025 23:31:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Goto (Gerrit)

unread,
Sep 15, 2025, 7:32:11 PM (9 days ago) Sep 15
to Jihad Hanna, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Jihad Hanna

Sam Goto added 1 comment

File chrome/browser/ui/autofill/chrome_autofill_client.cc
Line 1172, Patchset 13 (Latest): manager->AddObserver(email_verifier_observer_.get());
Sam Goto . unresolved

Note to self: we should probably put this behind a flag.

Open in Gerrit

Related details

Attention is currently required from:
  • Jihad Hanna
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 13
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Comment-Date: Mon, 15 Sep 2025 23:32:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Jihad Hanna (Gerrit)

unread,
Sep 17, 2025, 5:06:50 AM (8 days ago) Sep 17
to Sam Goto, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Sam Goto

Jihad Hanna added 6 comments

File chrome/browser/ui/autofill/chrome_autofill_client.cc
Line 1171, Patchset 16 (Latest): auto manager = std::make_unique<BrowserAutofillManager>(&driver);
manager->AddObserver(email_verifier_observer_.get());
return manager;
Jihad Hanna . unresolved

Check out `components/android_autofill/browser/android_autofill_manager.h` to see how we're initializing observers (with `base::ScopedObservation`)

File components/autofill/content/browser/email_verifier_observer.h
Line 13, Patchset 16 (Latest):class EmailVerifierObserver : public AutofillManager::Observer {
Jihad Hanna . unresolved

I think this should be called `EmailVerifierDelegate` (the current name sounds like an interface for observers of `EmailVerifier`).

File components/autofill/content/browser/email_verifier_observer.cc
Line 36, Patchset 16 (Latest): const AutofillProfile* profile =
*std::get_if<const AutofillProfile*>(&filling_payload);

std::u16string email = profile->GetRawInfo(EMAIL_ADDRESS);
if (email.empty()) {
return;
}
Jihad Hanna . unresolved

I think this shouldn't be necessary, the check right before it and the fact that we filled an email field would imply this, right?

Line 54, Patchset 16 (Latest): field->autocomplete_attribute() == "email";
Jihad Hanna . unresolved

Are you sure you want this (vs. `field->Type().GetAddressType() == EMAIL_ADDRESS`)

Yours is true only when the developper annotates the field as an email field.
The alternative is true whenever Autofill classifies a field as an email field, and we use many indicators for that, one of them is the HTML `autocomplete` attribute but we have other signals too.

Line 61, Patchset 16 (Latest): const AutofillField* field_with_nonce = form->GetFieldById(*it);
Jihad Hanna . unresolved

nit: &

File content/browser/webid/delegation/email_verification_request.cc
Line 286, Patchset 16 (Latest):EmailVerifier* EmailVerifier::GetOrCreateForFrame(
Jihad Hanna . unresolved

Are you sure you wanna have such a verfier for every frame from the beginning? (vs. just the main frame)

Supporting iframes comes with security risks (the user usually willingly visits the origin of the main frame, but usually doesn't know about the iframes. Automatically verifying the emails there might not be a good idea (just thinking out loud)

Open in Gerrit

Related details

Attention is currently required from:
  • Sam Goto
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 16
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Sam Goto <go...@chromium.org>
Gerrit-Comment-Date: Wed, 17 Sep 2025 09:06:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Goto (Gerrit)

unread,
Sep 17, 2025, 5:56:00 PM (7 days ago) Sep 17
to Chromium LUCI CQ, Jihad Hanna, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Jihad Hanna

Sam Goto added 6 comments

File chrome/browser/ui/autofill/chrome_autofill_client.cc
Line 1171, Patchset 16: auto manager = std::make_unique<BrowserAutofillManager>(&driver);
manager->AddObserver(email_verifier_observer_.get());
return manager;
Jihad Hanna . unresolved

Check out `components/android_autofill/browser/android_autofill_manager.h` to see how we're initializing observers (with `base::ScopedObservation`)

Sam Goto

Yeah, that makes a lot of sense and simplifies a lot (not having to unregister manually).

However, EmailVerifierDelegate is owned by ChromeAutofillClient (1:1 with WebContents), so not 1:1 for every BrowserAutofillManager (which is 1:1 with RendererFrameHost).

I like the idea of making EmailVerifierDelegate use ScopedObservation and be 1:1 with BrowserAutofillManager, but I wasn't sure who should own it.

I considered making EmailVerifierDelegate hang on the RenderFrameHostImpl UserData's structure, but I think that would mean I'd have to move it out of components/autofill.

I found ContentAutofillDriver, which is 1:1 with RenderFrameHost and accessible here in this method, so I made it own a EmailVerifierDelegate, made it a ScopedObservation and made the Observation() happen here.

I wasn't sure if conceptually speaking it made sense for ContentAutofillDriver to own the EmailVerifierDelegate, so I could use some guidance here if this is appropriate or not. Happy to change if you think there is a better place to hang it.

WDYT?

File components/autofill/content/browser/email_verifier_observer.h
Line 13, Patchset 16:class EmailVerifierObserver : public AutofillManager::Observer {
Jihad Hanna . resolved

I think this should be called `EmailVerifierDelegate` (the current name sounds like an interface for observers of `EmailVerifier`).

Sam Goto

Done

File components/autofill/content/browser/email_verifier_observer.cc
Line 36, Patchset 16: const AutofillProfile* profile =

*std::get_if<const AutofillProfile*>(&filling_payload);

std::u16string email = profile->GetRawInfo(EMAIL_ADDRESS);
if (email.empty()) {
return;
}
Jihad Hanna . unresolved

I think this shouldn't be necessary, the check right before it and the fact that we filled an email field would imply this, right?

Sam Goto

Isn't it possible that we filled a "name" WITHOUT an "email"? Or are you saying that the check that "fielled_fields_ids" (and that one of the fields that we filled was an "email" field) is sufficient for this code to know that an EMAIL_ADDRESS was filled?

If that's the case, done, I removed this check here and moved the variable declaration further down when it is used.

Line 54, Patchset 16: field->autocomplete_attribute() == "email";
Jihad Hanna . resolved

Are you sure you want this (vs. `field->Type().GetAddressType() == EMAIL_ADDRESS`)

Yours is true only when the developper annotates the field as an email field.
The alternative is true whenever Autofill classifies a field as an email field, and we use many indicators for that, one of them is the HTML `autocomplete` attribute but we have other signals too.

Sam Goto

The alternative is true whenever Autofill classifies a field as an email field, and we use many indicators for that

That seems broader than what I was aiming for, but seems robust and OK too. I'll take that suggestion and see if I can come up with any reason why that might not work later.

Thanks!

Line 61, Patchset 16: const AutofillField* field_with_nonce = form->GetFieldById(*it);
Jihad Hanna . resolved

nit: &

Sam Goto

Done

File content/browser/webid/delegation/email_verification_request.cc
Line 286, Patchset 16:EmailVerifier* EmailVerifier::GetOrCreateForFrame(
Jihad Hanna . resolved

Are you sure you wanna have such a verfier for every frame from the beginning? (vs. just the main frame)

Supporting iframes comes with security risks (the user usually willingly visits the origin of the main frame, but usually doesn't know about the iframes. Automatically verifying the emails there might not be a good idea (just thinking out loud)

Sam Goto

I believe so ... I was planning to add some permission policy to make sure that the main framing was explicitly and manually opting-into this, so that there is no way to abuse this without the main frame knowing about it ... So yeah, would be good to support all frames from the get go.

Open in Gerrit

Related details

Attention is currently required from:
  • Jihad Hanna
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 17
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Jihad Hanna <jihad...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Comment-Date: Wed, 17 Sep 2025 21:55:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Jihad Hanna <jihad...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Jihad Hanna (Gerrit)

unread,
Sep 18, 2025, 3:21:57 AM (7 days ago) Sep 18
to Sam Goto, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Christoph Schwering and Sam Goto

Jihad Hanna added 2 comments

Patchset-level comments
File-level comment, Patchset 17 (Latest):
Jihad Hanna . unresolved

The static casting is making me think that the architecture isn't optimal.

As I haven't reviewed the addition of new observers before, I'll ask Chris to review this one because I'm not sure what the best path forward is.

File chrome/browser/ui/autofill/chrome_autofill_client.cc
Line 1171, Patchset 16: auto manager = std::make_unique<BrowserAutofillManager>(&driver);
manager->AddObserver(email_verifier_observer_.get());
return manager;
Jihad Hanna . unresolved

Check out `components/android_autofill/browser/android_autofill_manager.h` to see how we're initializing observers (with `base::ScopedObservation`)

Sam Goto

Yeah, that makes a lot of sense and simplifies a lot (not having to unregister manually).

However, EmailVerifierDelegate is owned by ChromeAutofillClient (1:1 with WebContents), so not 1:1 for every BrowserAutofillManager (which is 1:1 with RendererFrameHost).

I like the idea of making EmailVerifierDelegate use ScopedObservation and be 1:1 with BrowserAutofillManager, but I wasn't sure who should own it.

I considered making EmailVerifierDelegate hang on the RenderFrameHostImpl UserData's structure, but I think that would mean I'd have to move it out of components/autofill.

I found ContentAutofillDriver, which is 1:1 with RenderFrameHost and accessible here in this method, so I made it own a EmailVerifierDelegate, made it a ScopedObservation and made the Observation() happen here.

I wasn't sure if conceptually speaking it made sense for ContentAutofillDriver to own the EmailVerifierDelegate, so I could use some guidance here if this is appropriate or not. Happy to change if you think there is a better place to hang it.

WDYT?

Jihad Hanna

You should only observe the `AutofillManager` of the main frame, as the other ones don't really do anything as they just forward events to the main frame. so it's fine to have this class owned by the client.

Open in Gerrit

Related details

Attention is currently required from:
  • Christoph Schwering
  • Sam Goto
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 17
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Sam Goto <go...@chromium.org>
Gerrit-Attention: Christoph Schwering <schw...@google.com>
Gerrit-Comment-Date: Thu, 18 Sep 2025 07:21:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Jihad Hanna <jihad...@google.com>
Comment-In-Reply-To: Sam Goto <go...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Goto (Gerrit)

unread,
Sep 18, 2025, 9:29:50 AM (7 days ago) Sep 18
to Jihad Hanna, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Christoph Schwering and Jihad Hanna

Sam Goto added 1 comment

File chrome/browser/ui/autofill/chrome_autofill_client.cc
Line 1171, Patchset 16: auto manager = std::make_unique<BrowserAutofillManager>(&driver);
manager->AddObserver(email_verifier_observer_.get());
return manager;
Jihad Hanna . unresolved

Check out `components/android_autofill/browser/android_autofill_manager.h` to see how we're initializing observers (with `base::ScopedObservation`)

Sam Goto

Yeah, that makes a lot of sense and simplifies a lot (not having to unregister manually).

However, EmailVerifierDelegate is owned by ChromeAutofillClient (1:1 with WebContents), so not 1:1 for every BrowserAutofillManager (which is 1:1 with RendererFrameHost).

I like the idea of making EmailVerifierDelegate use ScopedObservation and be 1:1 with BrowserAutofillManager, but I wasn't sure who should own it.

I considered making EmailVerifierDelegate hang on the RenderFrameHostImpl UserData's structure, but I think that would mean I'd have to move it out of components/autofill.

I found ContentAutofillDriver, which is 1:1 with RenderFrameHost and accessible here in this method, so I made it own a EmailVerifierDelegate, made it a ScopedObservation and made the Observation() happen here.

I wasn't sure if conceptually speaking it made sense for ContentAutofillDriver to own the EmailVerifierDelegate, so I could use some guidance here if this is appropriate or not. Happy to change if you think there is a better place to hang it.

WDYT?

Jihad Hanna

You should only observe the `AutofillManager` of the main frame, as the other ones don't really do anything as they just forward events to the main frame. so it's fine to have this class owned by the client.

Sam Goto

Ah, that (having ChromeAutofillDriver own Email verifier delegate) makes it much simpler then, because I can make the static cast inside of the content/browser/webid/delegation package in the EmailVerifierImpl, right?

Open in Gerrit

Related details

Attention is currently required from:
  • Christoph Schwering
  • Jihad Hanna
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 17
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Attention: Christoph Schwering <schw...@google.com>
Gerrit-Comment-Date: Thu, 18 Sep 2025 13:29:39 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Christoph Schwering (Gerrit)

unread,
Sep 18, 2025, 11:20:21 AM (7 days ago) Sep 18
to Sam Goto, Jihad Hanna, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Jihad Hanna and Sam Goto

Christoph Schwering added 1 comment

File chrome/browser/ui/autofill/chrome_autofill_client.cc
Line 1171, Patchset 16: auto manager = std::make_unique<BrowserAutofillManager>(&driver);
manager->AddObserver(email_verifier_observer_.get());
return manager;
Jihad Hanna . unresolved

Check out `components/android_autofill/browser/android_autofill_manager.h` to see how we're initializing observers (with `base::ScopedObservation`)

Sam Goto

Yeah, that makes a lot of sense and simplifies a lot (not having to unregister manually).

However, EmailVerifierDelegate is owned by ChromeAutofillClient (1:1 with WebContents), so not 1:1 for every BrowserAutofillManager (which is 1:1 with RendererFrameHost).

I like the idea of making EmailVerifierDelegate use ScopedObservation and be 1:1 with BrowserAutofillManager, but I wasn't sure who should own it.

I considered making EmailVerifierDelegate hang on the RenderFrameHostImpl UserData's structure, but I think that would mean I'd have to move it out of components/autofill.

I found ContentAutofillDriver, which is 1:1 with RenderFrameHost and accessible here in this method, so I made it own a EmailVerifierDelegate, made it a ScopedObservation and made the Observation() happen here.

I wasn't sure if conceptually speaking it made sense for ContentAutofillDriver to own the EmailVerifierDelegate, so I could use some guidance here if this is appropriate or not. Happy to change if you think there is a better place to hang it.

WDYT?

Jihad Hanna

You should only observe the `AutofillManager` of the main frame, as the other ones don't really do anything as they just forward events to the main frame. so it's fine to have this class owned by the client.

Sam Goto

Ah, that (having ChromeAutofillDriver own Email verifier delegate) makes it much simpler then, because I can make the static cast inside of the content/browser/webid/delegation package in the EmailVerifierImpl, right?

Christoph Schwering

I'm not sure yet I understand the requirements (haven't spent much time on the CL yet), so perhaps I'm missing the point:

I wasn't sure if conceptually speaking it made sense for ContentAutofillDriver to own the EmailVerifierDelegate, so I could use some guidance here if this is appropriate or not.

Having this in AutofillDriver seems wrong to me. AutofillDrivers only purpose is to only pass messages between AutofillAgents and AutofillManagers. I'd like te keep it that way 😊. For observations, we have `AutofillManager::Observer`.

Also, `CreateManager()` should not call into the driver ([documentation](https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/content/browser/content_autofill_client.h;l=37;drc=48d6f7175422b2c969c14258f9f8d5b196c28d18)). `CreateManager()` is called during the construction of `AutofillDriver`, so this is a tricky point in time.

EmailVerifierDelegate is owned by ChromeAutofillClient

Attention is currently required from:
  • Jihad Hanna
  • Sam Goto
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 17
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Attention: Sam Goto <go...@chromium.org>
Gerrit-Comment-Date: Thu, 18 Sep 2025 15:20:03 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Goto (Gerrit)

unread,
Sep 18, 2025, 1:32:09 PM (6 days ago) Sep 18
to Jihad Hanna, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Christoph Schwering and Jihad Hanna

Sam Goto added 1 comment

File chrome/browser/ui/autofill/chrome_autofill_client.cc
Sam Goto

Having this in AutofillDriver seems wrong to me. AutofillDrivers only purpose is to only pass messages between AutofillAgents and AutofillManagers. I'd like te keep it that way 😊.

Yeah, that didn't feel right to me either, conceptually speaking.

Would ScopedAutofillManagersObservation help?

Oh, ScopedAutofillManagersObservation might help indeed! It seems like it needs to be one per WebContents, which is great.

Since it is one per WebContents, would it make sense for me to make the ChromeAutofillClient own the EmailVerifierDelegate (one per WebContents too) and make it (the EmailVerifierDelegate) be a ScopedAutofillManagerObservation?

Does that sound right?

Open in Gerrit

Related details

Attention is currently required from:
  • Christoph Schwering
  • Jihad Hanna
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 17
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Attention: Christoph Schwering <schw...@google.com>
Gerrit-Comment-Date: Thu, 18 Sep 2025 17:31:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Jihad Hanna <jihad...@google.com>
Comment-In-Reply-To: Sam Goto <go...@chromium.org>
Comment-In-Reply-To: Christoph Schwering <schw...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Goto (Gerrit)

unread,
Sep 18, 2025, 4:45:47 PM (6 days ago) Sep 18
to Jihad Hanna, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
File chrome/browser/ui/autofill/chrome_autofill_client.cc
Sam Goto

I took this path and I think it looks much better now.

PTAL?

Interestingly, the OtpFieldDetector (also recently introduced and owned by the ChromeAutofillClient) also uses this pattern here [1].

[1] https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/integrators/one_time_tokens/otp_field_detector.cc;l=32

Open in Gerrit

Related details

Attention is currently required from:
  • Christoph Schwering
  • Jihad Hanna
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 20
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Attention: Christoph Schwering <schw...@google.com>
Gerrit-Comment-Date: Thu, 18 Sep 2025 20:45:36 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Christoph Schwering (Gerrit)

unread,
Sep 18, 2025, 5:49:50 PM (6 days ago) Sep 18
to Sam Goto, Jihad Hanna, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Jihad Hanna and Sam Goto

Christoph Schwering added 12 comments

File chrome/browser/ui/autofill/chrome_autofill_client.cc
Christoph Schwering

I took this path and I think it looks much better now.

I agree, that looks neat 😊
Thanks!

File components/autofill/content/browser/email_verifier_delegate.h
Line 20, Patchset 20 (Latest): ~EmailVerifierDelegate() override;
Christoph Schwering . unresolved

nit: move below other constructors and assignment operators (go/cstyle#Declaration_Order)

Line 16, Patchset 20 (Latest):// A handler for email verification logic that is triggered from Autofill.
Christoph Schwering . unresolved

Could you add more color what it handles etc.?

File components/autofill/content/browser/email_verifier_delegate.cc
Line 37, Patchset 20 (Latest): if (!std::get_if<const AutofillProfile*>(&filling_payload)) {
return;

}

const AutofillProfile* profile =
*std::get_if<const AutofillProfile*>(&filling_payload);
Christoph Schwering . unresolved

nit: either only do one `std::get_if()` call or do `std::holds_alternative()` + `std::get()`?

Line 50, Patchset 20 (Latest): std::find_if(filled_field_ids.begin(), filled_field_ids.end(),
Christoph Schwering . unresolved

nit: `std::ranges::find_if(std::find_if(filled_field_ids, ...`

Line 54, Patchset 20 (Latest): field->Type().GetAddressType() == EMAIL_ADDRESS;
Christoph Schwering . unresolved

Since this isn't about addresses, this should probably be `GetIdentityCredentialType()`.

Line 49, Patchset 20 (Latest): auto it =
std::find_if(filled_field_ids.begin(), filled_field_ids.end(),
[&form](const FieldGlobalId& field_id) {
const AutofillField* field = form->GetFieldById(field_id);
return field && !field->nonce().empty() &&
field->Type().GetAddressType() == EMAIL_ADDRESS;
});
Christoph Schwering . unresolved
Since `GetFieldById()` does linear lookup, flip the order?
```
const std::vector<std::unique_ptr<AutofillField>>& fields = form->fields();
auto it = std::ranges::find_if(
fields, [&](const std::unique_ptr<AutofillField>& field) {
return !field->nonce().empty() &&
field->Type().GetIdentityCredentialType()() == EMAIL_ADDRESS &&
filled_field_ids.contains(field->global_id());
});
if (it == form.fields() {
return;
}
```
Line 68, Patchset 20 (Latest): if (!rfh) {
return;
}
Christoph Schwering . unresolved

`rfh` is guaranteed to be non-null.

Line 78, Patchset 20 (Latest): base::Unretained(this), manager.GetWeakPtr(),
Christoph Schwering . unresolved

Why is this safe?

Since `OnEmailVerified()` doesn't use any state of `EmailVerifierDelegate`, do you want to make it a lambda or a free function?

Line 85, Patchset 20 (Latest): std::optional<std::string> verification) {
Christoph Schwering . unresolved

Could you document what this is?

Line 94, Patchset 20 (Latest): static_cast<BrowserAutofillManager*>(manager.get())
->driver()
Christoph Schwering . unresolved

nitty nit: `&>(*driver).`

File content/browser/webid/delegation/email_verifier_impl.cc
Line 16, Patchset 20 (Latest):EmailVerifier::~EmailVerifier() = default;
Christoph Schwering . unresolved

nit: Move to `content/public/browser/webid/email_verifier.cc`?

Open in Gerrit

Related details

Attention is currently required from:
  • Jihad Hanna
  • Sam Goto
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 20
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Attention: Sam Goto <go...@chromium.org>
Gerrit-Comment-Date: Thu, 18 Sep 2025 21:49:32 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Goto (Gerrit)

unread,
Sep 18, 2025, 7:05:09 PM (6 days ago) Sep 18
to Jihad Hanna, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Christoph Schwering and Jihad Hanna

Sam Goto added 12 comments

File chrome/browser/ui/autofill/chrome_autofill_client.cc
Line 1171, Patchset 16: auto manager = std::make_unique<BrowserAutofillManager>(&driver);
manager->AddObserver(email_verifier_observer_.get());
return manager;
Jihad Hanna . resolved
Sam Goto

Acknowledged

File components/autofill/content/browser/email_verifier_delegate.h
Line 20, Patchset 20: ~EmailVerifierDelegate() override;
Christoph Schwering . resolved

nit: move below other constructors and assignment operators (go/cstyle#Declaration_Order)

Sam Goto

Done

Line 16, Patchset 20:// A handler for email verification logic that is triggered from Autofill.
Christoph Schwering . resolved

Could you add more color what it handles etc.?

Sam Goto

Done, added more context.

File components/autofill/content/browser/email_verifier_delegate.cc
Line 37, Patchset 20: if (!std::get_if<const AutofillProfile*>(&filling_payload)) {

return;
}

const AutofillProfile* profile =
*std::get_if<const AutofillProfile*>(&filling_payload);
Christoph Schwering . resolved

nit: either only do one `std::get_if()` call or do `std::holds_alternative()` + `std::get()`?

Sam Goto

Done, picked doing only one `std::get_if()`.

Line 50, Patchset 20: std::find_if(filled_field_ids.begin(), filled_field_ids.end(),
Christoph Schwering . resolved

nit: `std::ranges::find_if(std::find_if(filled_field_ids, ...`

Sam Goto

ah, so much better, thanks, done!

Line 54, Patchset 20: field->Type().GetAddressType() == EMAIL_ADDRESS;
Christoph Schwering . unresolved

Since this isn't about addresses, this should probably be `GetIdentityCredentialType()`.

Sam Goto

This is actually about email addresses, and independent from IdentityCredentialType.

Am I missing something?


std::find_if(filled_field_ids.begin(), filled_field_ids.end(),
[&form](const FieldGlobalId& field_id) {
const AutofillField* field = form->GetFieldById(field_id);
return field && !field->nonce().empty() &&
field->Type().GetAddressType() == EMAIL_ADDRESS;
});
Christoph Schwering . resolved
Since `GetFieldById()` does linear lookup, flip the order?
```
const std::vector<std::unique_ptr<AutofillField>>& fields = form->fields();
auto it = std::ranges::find_if(
fields, [&](const std::unique_ptr<AutofillField>& field) {
return !field->nonce().empty() &&
field->Type().GetIdentityCredentialType()() == EMAIL_ADDRESS &&
filled_field_ids.contains(field->global_id());
});
if (it == form.fields() {
return;
}
```
Sam Goto

Makes sense. Done.

Line 68, Patchset 20: if (!rfh) {
return;
}
Christoph Schwering . resolved

`rfh` is guaranteed to be non-null.

Sam Goto

Acknowledged

Line 78, Patchset 20: base::Unretained(this), manager.GetWeakPtr(),
Christoph Schwering . unresolved

Why is this safe?

Since `OnEmailVerified()` doesn't use any state of `EmailVerifierDelegate`, do you want to make it a lambda or a free function?

Sam Goto

Ah, you are right that OnEmailVerified doesn't use any member variable of the EmailVerifierDelegate. I initially moved the callback into a method just to make it more readable, but I agree it if unnecessary.

I made the callback a lambda now, is this what you were looking for?

Line 85, Patchset 20: std::optional<std::string> verification) {
Christoph Schwering . resolved

Could you document what this is?

Sam Goto

Done

Line 94, Patchset 20: static_cast<BrowserAutofillManager*>(manager.get())
->driver()
Christoph Schwering . resolved

nitty nit: `&>(*driver).`

Sam Goto

Done

File content/browser/webid/delegation/email_verifier_impl.cc
Line 16, Patchset 20:EmailVerifier::~EmailVerifier() = default;
Christoph Schwering . resolved

nit: Move to `content/public/browser/webid/email_verifier.cc`?

Sam Goto

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Christoph Schwering
  • Jihad Hanna
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 20
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Attention: Christoph Schwering <schw...@google.com>
Gerrit-Comment-Date: Thu, 18 Sep 2025 23:04:59 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Christoph Schwering (Gerrit)

unread,
Sep 18, 2025, 7:44:27 PM (6 days ago) Sep 18
to Sam Goto, Jihad Hanna, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Jihad Hanna and Sam Goto

Christoph Schwering added 2 comments

File components/autofill/content/browser/email_verifier_delegate.cc
Line 54, Patchset 20: field->Type().GetAddressType() == EMAIL_ADDRESS;
Christoph Schwering . unresolved

Since this isn't about addresses, this should probably be `GetIdentityCredentialType()`.

Sam Goto

This is actually about email addresses, and independent from IdentityCredentialType.

Am I missing something?

Christoph Schwering

Oh, I thought this was related. I should take a look at the design doc 😊

I'm not sure what the right answer here is. There are ~3 options:

  • `field->Type().GetTypes().contains(EMAIL_ADDRESS)`
  • `field->Type().GetTypes().contains_any({EMAIL_ADDRESS, USERNAME_AND_EMAIL_ADDRESS, EMAIL_OR_LOYALTY_MEMBERSHIP_ID})`
  • `field->autofilled_type() == EMAIL_ADDRESS`

I guess the last option is what you want.

Some background to help with the decision:

We introduced those `AutofillType::GetFooType()` as part of making `AutofillType` a union type. For example, a field type can have the types `PASSPORT_NUMBER` and `NATIONAL_ID_CARD_NUMBER` at the same time to express that the field accepts both values. For now this is only used for Autofill AI but we expect to use this also for PWM.

For example, in the long term a field could also have types `USERNAME` and `EMAIL_ADDRESS` at once. Currently that's not possible yet (because of [these constraints](https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/autofill_type.h;l=26-31;drc=2468ad347c8302e00208e933d5215c17e84f824b)).

You're not interested in addresses in the sense of physical addresses, right? If that's correct, I'd suggest you do `field->Type().GetTypes().contains(EMAIL_ADDRESS)`. (I know, `Type().GetTypes()` looks strange -- to be fixed soon.)

If false positives are no problem, you may want to also `USERNAME_AND_EMAIL_ADDRESS` and maybe others. (I'm not familiar with the exact semantics of these types.)

But I guess what you really want to know is the **filled** value, right? In that case, `AutofillField::autofilled_type()` should be the right function.

Line 78, Patchset 20: base::Unretained(this), manager.GetWeakPtr(),
Christoph Schwering . resolved

Why is this safe?

Since `OnEmailVerified()` doesn't use any state of `EmailVerifierDelegate`, do you want to make it a lambda or a free function?

Sam Goto

Ah, you are right that OnEmailVerified doesn't use any member variable of the EmailVerifierDelegate. I initially moved the callback into a method just to make it more readable, but I agree it if unnecessary.

I made the callback a lambda now, is this what you were looking for?

Christoph Schwering

Thanks, that's what I had in mind.

(My point about `base::Unretained(this)` was there's non protection if `this` has died by the time the callback is called.)

Open in Gerrit

Related details

Attention is currently required from:
  • Jihad Hanna
  • Sam Goto
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 21
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Attention: Sam Goto <go...@chromium.org>
Gerrit-Comment-Date: Thu, 18 Sep 2025 23:44:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Goto (Gerrit)

unread,
Sep 18, 2025, 10:05:00 PM (6 days ago) Sep 18
to Jihad Hanna, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Christoph Schwering and Jihad Hanna

Sam Goto added 5 comments

Patchset-level comments
File-level comment, Patchset 17:
Jihad Hanna . resolved

The static casting is making me think that the architecture isn't optimal.

As I haven't reviewed the addition of new observers before, I'll ask Chris to review this one because I'm not sure what the best path forward is.

Sam Goto

Acknowledged

File chrome/browser/ui/autofill/chrome_autofill_client.cc
Line 1172, Patchset 13: manager->AddObserver(email_verifier_observer_.get());
Sam Goto . resolved

Note to self: we should probably put this behind a flag.

Sam Goto

Done

File components/autofill/content/browser/email_verifier_delegate.cc
Line 54, Patchset 20: field->Type().GetAddressType() == EMAIL_ADDRESS;
Christoph Schwering . unresolved

Since this isn't about addresses, this should probably be `GetIdentityCredentialType()`.

Sam Goto

This is actually about email addresses, and independent from IdentityCredentialType.

Am I missing something?

Christoph Schwering

Oh, I thought this was related. I should take a look at the design doc 😊

I'm not sure what the right answer here is. There are ~3 options:

  • `field->Type().GetTypes().contains(EMAIL_ADDRESS)`
  • `field->Type().GetTypes().contains_any({EMAIL_ADDRESS, USERNAME_AND_EMAIL_ADDRESS, EMAIL_OR_LOYALTY_MEMBERSHIP_ID})`
  • `field->autofilled_type() == EMAIL_ADDRESS`

I guess the last option is what you want.

Some background to help with the decision:

We introduced those `AutofillType::GetFooType()` as part of making `AutofillType` a union type. For example, a field type can have the types `PASSPORT_NUMBER` and `NATIONAL_ID_CARD_NUMBER` at the same time to express that the field accepts both values. For now this is only used for Autofill AI but we expect to use this also for PWM.

For example, in the long term a field could also have types `USERNAME` and `EMAIL_ADDRESS` at once. Currently that's not possible yet (because of [these constraints](https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/autofill_type.h;l=26-31;drc=2468ad347c8302e00208e933d5215c17e84f824b)).

You're not interested in addresses in the sense of physical addresses, right? If that's correct, I'd suggest you do `field->Type().GetTypes().contains(EMAIL_ADDRESS)`. (I know, `Type().GetTypes()` looks strange -- to be fixed soon.)

If false positives are no problem, you may want to also `USERNAME_AND_EMAIL_ADDRESS` and maybe others. (I'm not familiar with the exact semantics of these types.)

But I guess what you really want to know is the **filled** value, right? In that case, `AutofillField::autofilled_type()` should be the right function.

Sam Goto

You're not interested in addresses in the sense of physical addresses, right?

Right

But I guess what you really want to know is the filled value, right? In that case, AutofillField::autofilled_type() should be the right function.

Right, I think I want to make sure that the user has selected an email in the autofill UI and **filled** it with an email, **not** what the developer has announced or we classified the field as.

If `autofilled_type()` reflects that, the third option you mentioned `field->autofilled_type() == EMAIL_ADDRESS` seems to be most applicable here.

Done, changed.

File components/autofill/content/browser/email_verifier_observer.cc
Line 22, Patchset 13:void EmailVerifierObserver::OnFillOrPreviewForm(
Sam Goto . unresolved

TODO: add unit tests in this CL once I get a signal from reviewers that this is the right code structure.

Sam Goto

I'm still working on the unittests, please ignore the ones that I added in this last patch.

File content/browser/webid/delegation/email_verification_request.cc
Line 286, Patchset 13:EmailVerifier* EmailVerifier::GetOrCreateForFrame(
Sam Goto . unresolved

TODO: move this to another and independent CL once I get the signal from reviewers that this is the right code structure.

Sam Goto

Christoph, I'd be happy to move this to another CL if you'd like to keep this CL self-contained with the autofill files. LMK if you'd prefer that, but otherwise, I'll just add more reviewers to this CL once you are satisfied with the autofill changes.

Open in Gerrit

Related details

Attention is currently required from:
  • Christoph Schwering
  • Jihad Hanna
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 22
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Attention: Christoph Schwering <schw...@google.com>
Gerrit-Comment-Date: Fri, 19 Sep 2025 02:04:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Jihad Hanna <jihad...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Jihad Hanna (Gerrit)

unread,
Sep 19, 2025, 5:57:50 AM (6 days ago) Sep 19
to Sam Goto, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Christoph Schwering and Sam Goto

Jihad Hanna added 5 comments

File components/autofill/content/browser/email_verifier_delegate.cc
Jihad Hanna

+1 for `field->autofilled_type()`, this way we also support filling that comes from AddressOnTyping (% what I said in the other comment).

Line 50, Patchset 22 (Latest): const AutofillProfile* const* profile =
std::get_if<const AutofillProfile*>(&filling_payload);

if (!profile) {
return;
}
Jihad Hanna . unresolved

nit: Move down next to usage?

Line 74, Patchset 22 (Latest): const std::unique_ptr<AutofillField>& field = *it;
Jihad Hanna . unresolved

`filled_email_field`?

Line 74, Patchset 22 (Latest): const std::unique_ptr<AutofillField>& field = *it;
Jihad Hanna . unresolved

nit:

`const AutofillField& field = *it->get();`

Line 81, Patchset 22 (Latest): std::u16string email = (*profile)->GetRawInfo(EMAIL_ADDRESS);
Jihad Hanna . unresolved

Please add a TODO that this isn't how it should be done.

Ideally, you should just do `filled_email_field->value()`, but this currently wouldn't work, because `AutofillManager::Observer::OnFillOrPreviewForm` is unfortunately called before the cache (and hence the `FormStructure` you're using here) is updated.

This means that in reality we cannot yet support AddressOnTyping, which is yet another way to autofill an email address, but where the `filling_payload` isn't an `AutofillProfile`.

---

Apologies is this seems like too much context, TLDR is just to add a TODO so that we remember to fix this when we fix the `OnFillOrPreviewForm` callback.

Open in Gerrit

Related details

Attention is currently required from:
  • Christoph Schwering
  • Sam Goto
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 22
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Sam Goto <go...@chromium.org>
Gerrit-Attention: Christoph Schwering <schw...@google.com>
Gerrit-Comment-Date: Fri, 19 Sep 2025 09:57:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Jihad Hanna (Gerrit)

unread,
Sep 19, 2025, 6:01:23 AM (6 days ago) Sep 19
to Sam Goto, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Christoph Schwering and Sam Goto

Jihad Hanna added 1 comment

File components/autofill/content/browser/email_verifier_observer.cc
Line 36, Patchset 16: const AutofillProfile* profile =

*std::get_if<const AutofillProfile*>(&filling_payload);

std::u16string email = profile->GetRawInfo(EMAIL_ADDRESS);
if (email.empty()) {
return;
}
Jihad Hanna . resolved

I think this shouldn't be necessary, the check right before it and the fact that we filled an email field would imply this, right?

Sam Goto

Isn't it possible that we filled a "name" WITHOUT an "email"? Or are you saying that the check that "fielled_fields_ids" (and that one of the fields that we filled was an "email" field) is sufficient for this code to know that an EMAIL_ADDRESS was filled?

If that's the case, done, I removed this check here and moved the variable declaration further down when it is used.

Jihad Hanna

Thanks!

Gerrit-Comment-Date: Fri, 19 Sep 2025 10:01:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Christoph Schwering (Gerrit)

unread,
Sep 19, 2025, 8:50:38 AM (6 days ago) Sep 19
to Sam Goto, Jihad Hanna, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Sam Goto

Christoph Schwering added 6 comments

Patchset-level comments
File-level comment, Patchset 22 (Latest):
Christoph Schwering . resolved

Thanks, this looks good to me % tests and a few nits.

File components/autofill/content/browser/email_verifier_delegate.cc
Line 50, Patchset 22 (Latest): const AutofillProfile* const* profile =
std::get_if<const AutofillProfile*>(&filling_payload);

if (!profile) {
return;
}
Jihad Hanna . unresolved

nit: Move down next to usage?

Christoph Schwering

It makes sense to early-return before the form and field lookup, right?

Line 76, Patchset 22 (Latest): ContentAutofillDriver* content_driver =
static_cast<ContentAutofillDriver*>(&manager.driver());
Christoph Schwering . unresolved
nit:
```
ContentAutofillDriver& content_driver =
static_cast<ContentAutofillDriver&>(manager.driver());
```
Line 78, Patchset 22 (Latest):
Christoph Schwering . unresolved

nit: We use less vertical whitespace in Autofill. The style guide's phrasing has been weakened lately it's general recommendation is to use it sparingly.

File components/autofill/content/browser/email_verifier_delegate_unittest.cc
Line 70, Patchset 22 (Latest): EXPECT_CALL(*email_verifier, Verify(_, _, _, _))
Christoph Schwering . unresolved

nit: Just `Verify`?

File content/browser/webid/delegation/email_verification_request.cc
Line 286, Patchset 13:EmailVerifier* EmailVerifier::GetOrCreateForFrame(
Sam Goto . unresolved

TODO: move this to another and independent CL once I get the signal from reviewers that this is the right code structure.

Sam Goto

Christoph, I'd be happy to move this to another CL if you'd like to keep this CL self-contained with the autofill files. LMK if you'd prefer that, but otherwise, I'll just add more reviewers to this CL once you are satisfied with the autofill changes.

Christoph Schwering

That's fine by me.

Open in Gerrit

Related details

Attention is currently required from:
  • Sam Goto
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 22
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Sam Goto <go...@chromium.org>
Gerrit-Comment-Date: Fri, 19 Sep 2025 12:50:21 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Jihad Hanna (Gerrit)

unread,
Sep 19, 2025, 9:55:28 AM (6 days ago) Sep 19
to Sam Goto, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Sam Goto

Jihad Hanna added 1 comment

File components/autofill/content/browser/email_verifier_delegate.cc
Line 50, Patchset 22 (Latest): const AutofillProfile* const* profile =
std::get_if<const AutofillProfile*>(&filling_payload);

if (!profile) {
return;
}
Jihad Hanna . unresolved

nit: Move down next to usage?

Christoph Schwering

It makes sense to early-return before the form and field lookup, right?

Jihad Hanna

As a small optimization, yes. But since I would like to get rid of the profile completely (see my other comment about the TODO) I thought I'd have all the logic together.

Keeping it here also SGTM, just a suggestion.

Gerrit-Comment-Date: Fri, 19 Sep 2025 13:55:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Jihad Hanna <jihad...@google.com>
Comment-In-Reply-To: Christoph Schwering <schw...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Goto (Gerrit)

unread,
Sep 19, 2025, 4:09:03 PM (5 days ago) Sep 19
to Jihad Hanna, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Christoph Schwering and Jihad Hanna

Sam Goto added 10 comments

File components/autofill/content/browser/email_verifier_delegate.cc
Line 54, Patchset 20: field->Type().GetAddressType() == EMAIL_ADDRESS;
Christoph Schwering . resolved
Sam Goto

SGTM.

I'm going to resolve this, since I"m assuming I got this right. Feel free to re-open if I'm still missing something.

Line 50, Patchset 22: const AutofillProfile* const* profile =

std::get_if<const AutofillProfile*>(&filling_payload);

if (!profile) {
return;
}
Jihad Hanna . resolved

nit: Move down next to usage?

Christoph Schwering

It makes sense to early-return before the form and field lookup, right?

Jihad Hanna

As a small optimization, yes. But since I would like to get rid of the profile completely (see my other comment about the TODO) I thought I'd have all the logic together.

Keeping it here also SGTM, just a suggestion.

Sam Goto

Ok, I'll add the TODO and leave this here.

Line 74, Patchset 22: const std::unique_ptr<AutofillField>& field = *it;
Jihad Hanna . resolved

`filled_email_field`?

Sam Goto

Done, used email_field instead to be a bit shorter, LMK if you feel strongly about the "filled" suffix.

Line 74, Patchset 22: const std::unique_ptr<AutofillField>& field = *it;
Jihad Hanna . resolved

nit:

`const AutofillField& field = *it->get();`

Sam Goto

Done

Line 76, Patchset 22: ContentAutofillDriver* content_driver =
static_cast<ContentAutofillDriver*>(&manager.driver());
Christoph Schwering . resolved
nit:
```
ContentAutofillDriver& content_driver =
static_cast<ContentAutofillDriver&>(manager.driver());
```
Sam Goto

Done

Line 78, Patchset 22:
Christoph Schwering . resolved

nit: We use less vertical whitespace in Autofill. The style guide's phrasing has been weakened lately it's general recommendation is to use it sparingly.

Sam Goto

Was the extra new line that you wanted me to remove? If so, done. If not, feel free to reopen and clarity.

Line 81, Patchset 22: std::u16string email = (*profile)->GetRawInfo(EMAIL_ADDRESS);
Jihad Hanna . unresolved

Please add a TODO that this isn't how it should be done.

Ideally, you should just do `filled_email_field->value()`, but this currently wouldn't work, because `AutofillManager::Observer::OnFillOrPreviewForm` is unfortunately called before the cache (and hence the `FormStructure` you're using here) is updated.

This means that in reality we cannot yet support AddressOnTyping, which is yet another way to autofill an email address, but where the `filling_payload` isn't an `AutofillProfile`.

---

Apologies is this seems like too much context, TLDR is just to add a TODO so that we remember to fix this when we fix the `OnFillOrPreviewForm` callback.

Sam Goto

Done. Text LGTY?

File components/autofill/content/browser/email_verifier_delegate_unittest.cc
Line 70, Patchset 22: EXPECT_CALL(*email_verifier, Verify(_, _, _, _))
Christoph Schwering . resolved

nit: Just `Verify`?

Sam Goto

Ha, I didn't know you could just use the method's name when using _ parameters! Neat, thanks!

I've actually added expectations here that check that the right values are passed in this specific test, but I've changed to use the simpler version in other tests.

File components/autofill/content/browser/email_verifier_observer.cc
Line 22, Patchset 13:void EmailVerifierObserver::OnFillOrPreviewForm(
Sam Goto . resolved

TODO: add unit tests in this CL once I get a signal from reviewers that this is the right code structure.

Sam Goto

I'm still working on the unittests, please ignore the ones that I added in this last patch.

Sam Goto

I have added really good unittests now. Resolving.

File content/browser/webid/delegation/email_verification_request.cc
Line 286, Patchset 13:EmailVerifier* EmailVerifier::GetOrCreateForFrame(
Sam Goto . unresolved

TODO: move this to another and independent CL once I get the signal from reviewers that this is the right code structure.

Sam Goto

Christoph, I'd be happy to move this to another CL if you'd like to keep this CL self-contained with the autofill files. LMK if you'd prefer that, but otherwise, I'll just add more reviewers to this CL once you are satisfied with the autofill changes.

Christoph Schwering

That's fine by me.

Sam Goto

I have actually changed some of the constructors of the classes that this relies on to make this class more testable. I think there are enough changes now that I'm probably better off breaking that into a separate CL.

I'll break the extra changes unrelated to the autofill code into another CL momentarily.

Open in Gerrit

Related details

Attention is currently required from:
  • Christoph Schwering
  • Jihad Hanna
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 24
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Attention: Christoph Schwering <schw...@google.com>
Gerrit-Comment-Date: Fri, 19 Sep 2025 20:08:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Jihad Hanna <jihad...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Jihad Hanna (Gerrit)

unread,
Sep 20, 2025, 4:56:07 AM (5 days ago) Sep 20
to Sam Goto, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Christoph Schwering and Sam Goto

Jihad Hanna added 1 comment

File components/autofill/content/browser/email_verifier_delegate.cc
Line 81, Patchset 22: std::u16string email = (*profile)->GetRawInfo(EMAIL_ADDRESS);
Jihad Hanna . unresolved

Please add a TODO that this isn't how it should be done.

Ideally, you should just do `filled_email_field->value()`, but this currently wouldn't work, because `AutofillManager::Observer::OnFillOrPreviewForm` is unfortunately called before the cache (and hence the `FormStructure` you're using here) is updated.

This means that in reality we cannot yet support AddressOnTyping, which is yet another way to autofill an email address, but where the `filling_payload` isn't an `AutofillProfile`.

---

Apologies is this seems like too much context, TLDR is just to add a TODO so that we remember to fix this when we fix the `OnFillOrPreviewForm` callback.

Sam Goto

Done. Text LGTY?

Jihad Hanna

Yes, thank you!

Small nit: `TODO(crbug.com/446288895): `

Open in Gerrit

Related details

Attention is currently required from:
  • Christoph Schwering
  • Sam Goto
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 24
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Sam Goto <go...@chromium.org>
Gerrit-Attention: Christoph Schwering <schw...@google.com>
Gerrit-Comment-Date: Sat, 20 Sep 2025 08:55:46 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Christoph Schwering (Gerrit)

unread,
Sep 22, 2025, 5:57:17 AM (3 days ago) Sep 22
to Sam Goto, Jihad Hanna, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Sam Goto

Christoph Schwering added 3 comments

File components/autofill/content/browser/email_verifier_delegate.h
Line 13, Patchset 24 (Latest):namespace content {
Christoph Schwering . unresolved

Please fix this WARNING reported by ClangTidy: check: modernize-concat-nested-namespaces

nested namespaces can be concatenated...

check: modernize-concat-nested-namespaces

nested namespaces can be concatenated (https://clang.llvm.org/extra/clang-tidy/checks/modernize/concat-nested-namespaces.html)

(Note: You can add `Skip-Clang-Tidy-Checks: modernize-concat-nested-namespaces` footer to the CL description to skip the check)

(Lint observed on `android-clang-tidy-rel` and `linux-clang-tidy-rel`)

File components/autofill/content/browser/email_verifier_delegate_unittest.cc
Line 79, Patchset 24 (Latest):TEST_F(EmailVerifierDelegateTest, VerificationTriggered) {
Christoph Schwering . unresolved

Please add a brief (1-2 sentence) comment above each test.

Line 82, Patchset 24 (Latest): FormData form_data;
FormFieldData field;
field.set_label(u"Email");
field.set_name(u"email");
field.set_form_control_type(FormControlType::kInputEmail);
field.set_nonce(u"test_nonce");
form_data.set_fields({field});
Christoph Schwering . unresolved

Please use test util functions to create the form and field `Form[Field]Data` objects because they also set internal fields. Unfortunately there's a zoo of such functions. Probably the best one for your use-case is the mechanism used [here](https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/filling/form_filler_unittest.cc;l=371-386;drc=2468ad347c8302e00208e933d5215c17e84f824b).

Open in Gerrit

Related details

Attention is currently required from:
  • Sam Goto
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 24
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Sam Goto <go...@chromium.org>
Gerrit-Comment-Date: Mon, 22 Sep 2025 09:57:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Goto (Gerrit)

unread,
Sep 22, 2025, 3:11:32 PM (2 days ago) Sep 22
to Jihad Hanna, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Christoph Schwering and Jihad Hanna

Sam Goto added 4 comments

File components/autofill/content/browser/email_verifier_delegate.h
Line 13, Patchset 24:namespace content {
Christoph Schwering . resolved

Please fix this WARNING reported by ClangTidy: check: modernize-concat-nested-namespaces

nested namespaces can be concatenated...

check: modernize-concat-nested-namespaces

nested namespaces can be concatenated (https://clang.llvm.org/extra/clang-tidy/checks/modernize/concat-nested-namespaces.html)

(Note: You can add `Skip-Clang-Tidy-Checks: modernize-concat-nested-namespaces` footer to the CL description to skip the check)

(Lint observed on `android-clang-tidy-rel` and `linux-clang-tidy-rel`)

Sam Goto

Done

File components/autofill/content/browser/email_verifier_delegate.cc
Line 81, Patchset 22: std::u16string email = (*profile)->GetRawInfo(EMAIL_ADDRESS);
Jihad Hanna . resolved

Please add a TODO that this isn't how it should be done.

Ideally, you should just do `filled_email_field->value()`, but this currently wouldn't work, because `AutofillManager::Observer::OnFillOrPreviewForm` is unfortunately called before the cache (and hence the `FormStructure` you're using here) is updated.

This means that in reality we cannot yet support AddressOnTyping, which is yet another way to autofill an email address, but where the `filling_payload` isn't an `AutofillProfile`.

---

Apologies is this seems like too much context, TLDR is just to add a TODO so that we remember to fix this when we fix the `OnFillOrPreviewForm` callback.

Sam Goto

Done. Text LGTY?

Jihad Hanna

Yes, thank you!

Small nit: `TODO(crbug.com/446288895): `

Sam Goto

Done

File components/autofill/content/browser/email_verifier_delegate_unittest.cc
Line 79, Patchset 24:TEST_F(EmailVerifierDelegateTest, VerificationTriggered) {
Christoph Schwering . resolved

Please add a brief (1-2 sentence) comment above each test.

Sam Goto

Done

Line 82, Patchset 24: FormData form_data;

FormFieldData field;
field.set_label(u"Email");
field.set_name(u"email");
field.set_form_control_type(FormControlType::kInputEmail);
field.set_nonce(u"test_nonce");
form_data.set_fields({field});
Christoph Schwering . unresolved

Please use test util functions to create the form and field `Form[Field]Data` objects because they also set internal fields. Unfortunately there's a zoo of such functions. Probably the best one for your use-case is the mechanism used [here](https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/filling/form_filler_unittest.cc;l=371-386;drc=2468ad347c8302e00208e933d5215c17e84f824b).

Sam Goto

Thanks! I added test::GetFormData() for one of the tests, but I couldn't switch for all of the tests because I can't set the "nonce" in it yet.

I considered adding setting the "nonce" in GetFormData() but that seemed to increase to scope of this CL more than I should, so I left it as a TODO.

Does that make sense?

Otherwise, I can add support for adding "nonce" in GetFormData() and the FormDescription and rebase this CL in that.

I also considered using the mutable_field() in the FormData to set_nonce(), but that seemed very Passkey-specific.

I added a TDOO against this cover bug to make sure it doesn't fall through the tracks, but if you feel strongly I should address this before hand, I'd be happy to kick off another CL.

Open in Gerrit

Related details

Attention is currently required from:
  • Christoph Schwering
  • Jihad Hanna
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 25
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Attention: Christoph Schwering <schw...@google.com>
Gerrit-Comment-Date: Mon, 22 Sep 2025 19:11:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Jihad Hanna <jihad...@google.com>
Comment-In-Reply-To: Sam Goto <go...@chromium.org>
Comment-In-Reply-To: Christoph Schwering <schw...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Goto (Gerrit)

unread,
Sep 22, 2025, 3:25:03 PM (2 days ago) Sep 22
to Jihad Hanna, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Christoph Schwering and Jihad Hanna

Sam Goto voted and added 1 comment

Votes added by Sam Goto

Commit-Queue+1

1 comment

File content/browser/webid/delegation/email_verification_request.cc
Line 286, Patchset 13:EmailVerifier* EmailVerifier::GetOrCreateForFrame(
Sam Goto . resolved

TODO: move this to another and independent CL once I get the signal from reviewers that this is the right code structure.

Sam Goto

Christoph, I'd be happy to move this to another CL if you'd like to keep this CL self-contained with the autofill files. LMK if you'd prefer that, but otherwise, I'll just add more reviewers to this CL once you are satisfied with the autofill changes.

Christoph Schwering

That's fine by me.

Sam Goto

I have actually changed some of the constructors of the classes that this relies on to make this class more testable. I think there are enough changes now that I'm probably better off breaking that into a separate CL.

I'll break the extra changes unrelated to the autofill code into another CL momentarily.

Sam Goto

Done, I broke the non-autofill parts of this CL into a separate CL, so that they can be reviewed independently. I rebased this CL on top of the other one.

Resolving this now.

Open in Gerrit

Related details

Attention is currently required from:
  • Christoph Schwering
  • Jihad Hanna
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 26
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Attention: Christoph Schwering <schw...@google.com>
Gerrit-Comment-Date: Mon, 22 Sep 2025 19:24:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Goto (Gerrit)

unread,
Sep 22, 2025, 4:12:25 PM (2 days ago) Sep 22
to Jihad Hanna, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Christoph Schwering and Jihad Hanna

Sam Goto added 1 comment

File components/autofill/content/browser/email_verifier_delegate_unittest.cc
Line 82, Patchset 24: FormData form_data;
FormFieldData field;
field.set_label(u"Email");
field.set_name(u"email");
field.set_form_control_type(FormControlType::kInputEmail);
field.set_nonce(u"test_nonce");
form_data.set_fields({field});
Christoph Schwering . resolved

Please use test util functions to create the form and field `Form[Field]Data` objects because they also set internal fields. Unfortunately there's a zoo of such functions. Probably the best one for your use-case is the mechanism used [here](https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/filling/form_filler_unittest.cc;l=371-386;drc=2468ad347c8302e00208e933d5215c17e84f824b).

Sam Goto

Thanks! I added test::GetFormData() for one of the tests, but I couldn't switch for all of the tests because I can't set the "nonce" in it yet.

I considered adding setting the "nonce" in GetFormData() but that seemed to increase to scope of this CL more than I should, so I left it as a TODO.

Does that make sense?

Otherwise, I can add support for adding "nonce" in GetFormData() and the FormDescription and rebase this CL in that.

I also considered using the mutable_field() in the FormData to set_nonce(), but that seemed very Passkey-specific.

I added a TDOO against this cover bug to make sure it doesn't fall through the tracks, but if you feel strongly I should address this before hand, I'd be happy to kick off another CL.

Sam Goto

Ok, I added the support for test::GetFormData() to set "nonce" in fields and branched from this CL so that it can be reviewed/submitted independently:

https://chromium-review.googlesource.com/c/chromium/src/+/6973355

I'm going mark this as resolved, LMK if you feel strongly about inverting the dependencies (order in which they get submitted), but otherwise I'll assume that this order that I'm suggesting is acceptable.

Open in Gerrit

Related details

Attention is currently required from:
  • Christoph Schwering
  • Jihad Hanna
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 26
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Attention: Christoph Schwering <schw...@google.com>
Gerrit-Comment-Date: Mon, 22 Sep 2025 20:12:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Christoph Schwering (Gerrit)

unread,
Sep 23, 2025, 5:19:23 AM (2 days ago) Sep 23
to Sam Goto, Jihad Hanna, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Jihad Hanna and Sam Goto

Christoph Schwering voted and added 3 comments

Votes added by Christoph Schwering

Code-Review+1

3 comments

Patchset-level comments
File-level comment, Patchset 26 (Latest):
Christoph Schwering . resolved

LGTM, thank you!

File components/autofill/content/browser/email_verifier_delegate_unittest.cc
Line 81, Patchset 26 (Latest):// Verifies that the success test case works as expected: the form comforms to
Christoph Schwering . unresolved

Please fix this WARNING reported by Spellchecker: "comforms" is a possible misspelling of "conforms" or "comforts".

To bypass Spe...

"comforms" is a possible misspelling of "conforms" or "comforts".

To bypass Spellchecker, add a footer with DISABLE_SPELLCHECKER

Line 82, Patchset 24: FormData form_data;
FormFieldData field;
field.set_label(u"Email");
field.set_name(u"email");
field.set_form_control_type(FormControlType::kInputEmail);
field.set_nonce(u"test_nonce");
form_data.set_fields({field});
Christoph Schwering . resolved

Please use test util functions to create the form and field `Form[Field]Data` objects because they also set internal fields. Unfortunately there's a zoo of such functions. Probably the best one for your use-case is the mechanism used [here](https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/filling/form_filler_unittest.cc;l=371-386;drc=2468ad347c8302e00208e933d5215c17e84f824b).

Sam Goto

Thanks! I added test::GetFormData() for one of the tests, but I couldn't switch for all of the tests because I can't set the "nonce" in it yet.

I considered adding setting the "nonce" in GetFormData() but that seemed to increase to scope of this CL more than I should, so I left it as a TODO.

Does that make sense?

Otherwise, I can add support for adding "nonce" in GetFormData() and the FormDescription and rebase this CL in that.

I also considered using the mutable_field() in the FormData to set_nonce(), but that seemed very Passkey-specific.

I added a TDOO against this cover bug to make sure it doesn't fall through the tracks, but if you feel strongly I should address this before hand, I'd be happy to kick off another CL.

Sam Goto

Ok, I added the support for test::GetFormData() to set "nonce" in fields and branched from this CL so that it can be reviewed/submitted independently:

https://chromium-review.googlesource.com/c/chromium/src/+/6973355

I'm going mark this as resolved, LMK if you feel strongly about inverting the dependencies (order in which they get submitted), but otherwise I'll assume that this order that I'm suggesting is acceptable.

Christoph Schwering

Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Jihad Hanna
  • Sam Goto
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 26
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Attention: Sam Goto <go...@chromium.org>
Gerrit-Comment-Date: Tue, 23 Sep 2025 09:19:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Sam Goto (Gerrit)

unread,
Sep 23, 2025, 8:03:37 PM (2 days ago) Sep 23
to Jihad Hanna, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Jihad Hanna

Sam Goto added 1 comment

File components/autofill/content/browser/email_verifier_delegate_unittest.cc
Line 81, Patchset 26:// Verifies that the success test case works as expected: the form comforms to
Christoph Schwering . resolved

Please fix this WARNING reported by Spellchecker: "comforms" is a possible misspelling of "conforms" or "comforts".

To bypass Spe...

"comforms" is a possible misspelling of "conforms" or "comforts".

To bypass Spellchecker, add a footer with DISABLE_SPELLCHECKER

Sam Goto

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Jihad Hanna
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
Gerrit-Change-Number: 6902200
Gerrit-PatchSet: 27
Gerrit-Owner: Sam Goto <go...@chromium.org>
Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
Gerrit-Reviewer: Sam Goto <go...@chromium.org>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Jihad Hanna <jihad...@google.com>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Jihad Hanna <jihad...@google.com>
Gerrit-Comment-Date: Wed, 24 Sep 2025 00:03:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Christoph Schwering <schw...@google.com>
satisfied_requirement
open
diffy

Sam Goto (Gerrit)

unread,
Sep 24, 2025, 7:59:50 PM (5 hours ago) Sep 24
to Jihad Hanna, Chromium LUCI CQ, Christian Biesinger, Kaan Icer, AyeAye, chromium...@chromium.org, tmartino+tran...@chromium.org, ios-r...@chromium.org, osaul+aut...@google.com, siashah+au...@chromium.org, armalhotra+a...@google.com, vinnypersky+...@google.com, shgar+aut...@google.com, siyua+aut...@chromium.org, jmedle...@chromium.org, blink-...@chromium.org, npm+...@chromium.org, yigu+...@chromium.org, browser-comp...@chromium.org, rouslan+au...@chromium.org
Attention needed from Jihad Hanna

Sam Goto added 1 comment

File components/autofill/content/browser/email_verifier_delegate_unittest.cc
Line 67, Patchset 29 (Latest): AutofillDriverTestApi(driver_.get())
.SetLifecycleState(AutofillDriver::LifecycleState::kPendingDeletion);
Sam Goto . unresolved

Christoph, I had to add this to address tests failing in the CQ with this error [1].

Since this is a mock, the internal lifecycle state isn't set internally, so I had to set it externally before it gets destroyed.

Does this look right to you? Any other way I can/should accomplish this?

[1] [ RUN ] EmailVerifierDelegateTest.FeatureDisabled
[915122:915122:FATAL:components/autofill/core/browser/foundations/autofill_driver.cc:42] Check failed: lifecycle_state_ == LifecycleState::kPendingDeletion (0 vs. 3)
#0 0x5b8b9e7587d2 base::debug::CollectStackTrace()

Open in Gerrit

Related details

Attention is currently required from:
  • Jihad Hanna
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: Ia72d00aeeb02729fd4be1ec5569d8fc23676002b
    Gerrit-Change-Number: 6902200
    Gerrit-PatchSet: 29
    Gerrit-Owner: Sam Goto <go...@chromium.org>
    Gerrit-Reviewer: Christoph Schwering <schw...@google.com>
    Gerrit-Reviewer: Sam Goto <go...@chromium.org>
    Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
    Gerrit-CC: Jihad Hanna <jihad...@google.com>
    Gerrit-CC: Kaan Icer <ic...@chromium.org>
    Gerrit-Attention: Jihad Hanna <jihad...@google.com>
    Gerrit-Comment-Date: Wed, 24 Sep 2025 23:59:38 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages