Autofill: Send sensitive payment type predictions to the renderer [chromium/src : main]

0 views
Skip to first unread message

Nan Lin (Gerrit)

unread,
Jan 23, 2026, 9:47:26 AMJan 23
to Stephen McGruer, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, ios-r...@chromium.org, ipc-securi...@chromium.org, tmartino+tran...@chromium.org
Attention needed from Stephen McGruer

Nan Lin added 1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Nan Lin . resolved

@smcg...@chromium.org Could you PTAL, thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Stephen McGruer
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2277284b6c5f574fd5dd2ebd016351c71ff6c78c
Gerrit-Change-Number: 7511630
Gerrit-PatchSet: 6
Gerrit-Owner: Nan Lin <lin...@chromium.org>
Gerrit-Reviewer: Nan Lin <lin...@chromium.org>
Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
Gerrit-Comment-Date: Fri, 23 Jan 2026 14:47:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Nan Lin (Gerrit)

unread,
Jan 23, 2026, 9:48:46 AMJan 23
to Chromium IPC Reviews, Philip Rogers, Stephen McGruer, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, ios-r...@chromium.org, ipc-securi...@chromium.org, tmartino+tran...@chromium.org
Attention needed from Chromium IPC Reviews, Philip Rogers and Stephen McGruer

Nan Lin added 1 comment

Patchset-level comments
Nan Lin . resolved

@p...@chromium.org Could you PTAL at blink changes, thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Chromium IPC Reviews
  • Philip Rogers
  • Stephen McGruer
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2277284b6c5f574fd5dd2ebd016351c71ff6c78c
Gerrit-Change-Number: 7511630
Gerrit-PatchSet: 6
Gerrit-Owner: Nan Lin <lin...@chromium.org>
Gerrit-Reviewer: Chromium IPC Reviews <chrome-ip...@google.com>
Gerrit-Reviewer: Nan Lin <lin...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Chromium IPC Reviews <chrome-ip...@google.com>
Gerrit-Comment-Date: Fri, 23 Jan 2026 14:48:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

gwsq (Gerrit)

unread,
Jan 23, 2026, 9:50:53 AMJan 23
to Nan Lin, Chromium IPC Reviews, Ken Buchanan, Khushal Sagar, Shivani Sharma, Philip Rogers, Stephen McGruer, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, ios-r...@chromium.org, ipc-securi...@chromium.org, tmartino+tran...@chromium.org
Attention needed from Ken Buchanan, Philip Rogers and Stephen McGruer

Message from gwsq

From googleclient/chrome/chromium_gwsq/ipc/config.gwsq:
IPC: ke...@chromium.org

📎 It looks like you’re making a possibly security-sensitive change! 📎 IPC security review isn’t a rubberstamp, so your friendly security reviewer will need a fair amount of context to review your CL effectively. Please review your CL description and code comments to make sure they provide context for someone unfamiliar with your project/area. Pay special attention to where data comes from and which processes it flows between (and their privilege levels). Feel free to point your security reviewer at design docs, bugs, or other links if you can’t reasonably make a self-contained CL description. (Also see https://cbea.ms/git-commit/).

IPC reviewer(s): ke...@chromium.org


Reviewer source(s):
ke...@chromium.org is from context(googleclient/chrome/chromium_gwsq/ipc/config.gwsq)

Open in Gerrit

Related details

Attention is currently required from:
  • Ken Buchanan
  • Philip Rogers
  • Stephen McGruer
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2277284b6c5f574fd5dd2ebd016351c71ff6c78c
Gerrit-Change-Number: 7511630
Gerrit-PatchSet: 6
Gerrit-Owner: Nan Lin <lin...@chromium.org>
Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
Gerrit-Reviewer: Nan Lin <lin...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
Gerrit-CC: Khushal Sagar <khusha...@chromium.org>
Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
Gerrit-CC: gwsq
Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Ken Buchanan <ke...@chromium.org>
Gerrit-Comment-Date: Fri, 23 Jan 2026 14:50:46 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Ken Buchanan (Gerrit)

unread,
Jan 23, 2026, 12:05:28 PMJan 23
to Nan Lin, Chromium IPC Reviews, Khushal Sagar, Shivani Sharma, Philip Rogers, Stephen McGruer, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, ios-r...@chromium.org, ipc-securi...@chromium.org, tmartino+tran...@chromium.org
Attention needed from Nan Lin, Philip Rogers and Stephen McGruer

Ken Buchanan added 1 comment

File components/autofill/core/common/mojom/autofill_types.mojom
Line 440, Patchset 7 (Latest): // Indicates if the field contains sensitive payment data.
Ken Buchanan . unresolved

This comment doesn't add any information.

More useful would be a reference to docs, specs or elsewhere in the code base that has more on the meaning of `sensitive payment data`.

Open in Gerrit

Related details

Attention is currently required from:
  • Nan Lin
  • Philip Rogers
  • Stephen McGruer
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I2277284b6c5f574fd5dd2ebd016351c71ff6c78c
    Gerrit-Change-Number: 7511630
    Gerrit-PatchSet: 7
    Gerrit-Owner: Nan Lin <lin...@chromium.org>
    Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
    Gerrit-Reviewer: Nan Lin <lin...@chromium.org>
    Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
    Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
    Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-CC: Khushal Sagar <khusha...@chromium.org>
    Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Nan Lin <lin...@chromium.org>
    Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
    Gerrit-Attention: Philip Rogers <p...@chromium.org>
    Gerrit-Comment-Date: Fri, 23 Jan 2026 17:05:21 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Nan Lin (Gerrit)

    unread,
    Jan 23, 2026, 1:06:00 PMJan 23
    to Chromium IPC Reviews, Ken Buchanan, Khushal Sagar, Shivani Sharma, Philip Rogers, Stephen McGruer, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, ios-r...@chromium.org, ipc-securi...@chromium.org, tmartino+tran...@chromium.org
    Attention needed from Ken Buchanan, Philip Rogers and Stephen McGruer

    Nan Lin added 1 comment

    File components/autofill/core/common/mojom/autofill_types.mojom
    Line 440, Patchset 7: // Indicates if the field contains sensitive payment data.
    Ken Buchanan . resolved

    This comment doesn't add any information.

    More useful would be a reference to docs, specs or elsewhere in the code base that has more on the meaning of `sensitive payment data`.

    Nan Lin

    Thanks, updated with a reference to the code that defines this.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ken Buchanan
    • Philip Rogers
    • Stephen McGruer
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I2277284b6c5f574fd5dd2ebd016351c71ff6c78c
      Gerrit-Change-Number: 7511630
      Gerrit-PatchSet: 8
      Gerrit-Owner: Nan Lin <lin...@chromium.org>
      Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
      Gerrit-Reviewer: Nan Lin <lin...@chromium.org>
      Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
      Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
      Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
      Gerrit-CC: Khushal Sagar <khusha...@chromium.org>
      Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
      Gerrit-CC: gwsq
      Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
      Gerrit-Attention: Philip Rogers <p...@chromium.org>
      Gerrit-Attention: Ken Buchanan <ke...@chromium.org>
      Gerrit-Comment-Date: Fri, 23 Jan 2026 18:05:54 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Ken Buchanan <ke...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Philip Rogers (Gerrit)

      unread,
      Jan 23, 2026, 1:42:48 PMJan 23
      to Nan Lin, Chromium IPC Reviews, Ken Buchanan, Khushal Sagar, Shivani Sharma, Stephen McGruer, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, ios-r...@chromium.org, ipc-securi...@chromium.org, tmartino+tran...@chromium.org
      Attention needed from Ken Buchanan, Nan Lin and Stephen McGruer

      Philip Rogers added 1 comment

      File third_party/blink/public/web/web_form_control_element.h
      Line 171, Patchset 8 (Latest): void SetHasBeenSensitivePaymentField();
      Philip Rogers . unresolved

      A similar bit for password fields is slightly different (HTMLInputElement::has_been_password_field_, HTMLInputElement::MaybeSetHasBeenPasswordField, WebInputElement::MaybeSetHasBeenPasswordField). One difference is that there is an input type=password that is used to set has_been_password_field_, but otherwise, these features seem pretty similar. Are there reasons for being different (e.g. putting the bit on text control element rather than html input element, and using web_form_control_element rather than web_input_element)? If not, what do you think about copying how the password field bit works?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ken Buchanan
      • Nan Lin
      • Stephen McGruer
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I2277284b6c5f574fd5dd2ebd016351c71ff6c78c
        Gerrit-Change-Number: 7511630
        Gerrit-PatchSet: 8
        Gerrit-Owner: Nan Lin <lin...@chromium.org>
        Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
        Gerrit-Reviewer: Nan Lin <lin...@chromium.org>
        Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
        Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
        Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
        Gerrit-CC: Khushal Sagar <khusha...@chromium.org>
        Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
        Gerrit-CC: gwsq
        Gerrit-Attention: Nan Lin <lin...@chromium.org>
        Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
        Gerrit-Attention: Ken Buchanan <ke...@chromium.org>
        Gerrit-Comment-Date: Fri, 23 Jan 2026 18:42:39 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Nan Lin (Gerrit)

        unread,
        Jan 23, 2026, 1:53:59 PMJan 23
        to Chromium IPC Reviews, Ken Buchanan, Khushal Sagar, Shivani Sharma, Philip Rogers, Stephen McGruer, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, ios-r...@chromium.org, ipc-securi...@chromium.org, tmartino+tran...@chromium.org
        Attention needed from Ken Buchanan, Philip Rogers and Stephen McGruer

        Nan Lin added 1 comment

        File third_party/blink/public/web/web_form_control_element.h
        Line 171, Patchset 8 (Latest): void SetHasBeenSensitivePaymentField();
        Philip Rogers . unresolved

        A similar bit for password fields is slightly different (HTMLInputElement::has_been_password_field_, HTMLInputElement::MaybeSetHasBeenPasswordField, WebInputElement::MaybeSetHasBeenPasswordField). One difference is that there is an input type=password that is used to set has_been_password_field_, but otherwise, these features seem pretty similar. Are there reasons for being different (e.g. putting the bit on text control element rather than html input element, and using web_form_control_element rather than web_input_element)? If not, what do you think about copying how the password field bit works?

        Nan Lin

        IIUC type=password is only valid for the <input> element in HTML, that's why it's put in HtmlInputElement and WebInputElement. The sensitive payment data is determined by Autofill in the browser process. I chose TextControlElement and WebFormControlElement to handle both <input> and <textarea> elements uniformly.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Ken Buchanan
        • Philip Rogers
        • Stephen McGruer
        Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
        Gerrit-Attention: Philip Rogers <p...@chromium.org>
        Gerrit-Attention: Ken Buchanan <ke...@chromium.org>
        Gerrit-Comment-Date: Fri, 23 Jan 2026 18:53:55 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Philip Rogers <p...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Ken Buchanan (Gerrit)

        unread,
        Jan 23, 2026, 2:40:14 PMJan 23
        to Nan Lin, Chromium IPC Reviews, Khushal Sagar, Shivani Sharma, Philip Rogers, Stephen McGruer, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, ios-r...@chromium.org, ipc-securi...@chromium.org, tmartino+tran...@chromium.org
        Attention needed from Nan Lin, Philip Rogers and Stephen McGruer

        Ken Buchanan voted and added 1 comment

        Votes added by Ken Buchanan

        Code-Review+1

        1 comment

        Patchset-level comments
        File-level comment, Patchset 8 (Latest):
        Ken Buchanan . resolved

        mojom lgtm

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Nan Lin
        • Philip Rogers
        • Stephen McGruer
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I2277284b6c5f574fd5dd2ebd016351c71ff6c78c
          Gerrit-Change-Number: 7511630
          Gerrit-PatchSet: 8
          Gerrit-Owner: Nan Lin <lin...@chromium.org>
          Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
          Gerrit-Reviewer: Nan Lin <lin...@chromium.org>
          Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
          Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
          Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
          Gerrit-CC: Khushal Sagar <khusha...@chromium.org>
          Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
          Gerrit-CC: gwsq
          Gerrit-Attention: Nan Lin <lin...@chromium.org>
          Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
          Gerrit-Attention: Philip Rogers <p...@chromium.org>
          Gerrit-Comment-Date: Fri, 23 Jan 2026 19:40:06 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Khushal Sagar (Gerrit)

          unread,
          Jan 23, 2026, 5:53:04 PMJan 23
          to Nan Lin, Ken Buchanan, Chromium IPC Reviews, Shivani Sharma, Philip Rogers, Stephen McGruer, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, ios-r...@chromium.org, ipc-securi...@chromium.org, tmartino+tran...@chromium.org
          Attention needed from Nan Lin, Philip Rogers and Stephen McGruer

          Khushal Sagar added 2 comments

          Patchset-level comments
          Khushal Sagar . unresolved

          Since the data was only available in the browser so far, the redaction is being done during APC proto generation [here](https://source.chromium.org/chromium/chromium/src/+/main:components/optimization_guide/content/browser/page_content_proto_util.cc;l=601;drc=bf712ec1a13783224debb691ba88ad5c15b93194). If the state can instead be sent to the renderer, we shouldn't use the browser-side code so all redaction can happen in the renderer. But I'm not sure how expensive it is to send these messages from browser -> renderer.

          The alternative would be to send geometry for all form controls (which could be potentially sensitive) as a part of APC. That extraction is rare so it's ok but this will be more expensive when we track this geometry through the rendering pipeline (will happen every frame).

          I think this is worth a design doc.

          File third_party/blink/public/web/web_form_control_element.h
          Line 171, Patchset 8 (Latest): void SetHasBeenSensitivePaymentField();
          Philip Rogers . unresolved

          A similar bit for password fields is slightly different (HTMLInputElement::has_been_password_field_, HTMLInputElement::MaybeSetHasBeenPasswordField, WebInputElement::MaybeSetHasBeenPasswordField). One difference is that there is an input type=password that is used to set has_been_password_field_, but otherwise, these features seem pretty similar. Are there reasons for being different (e.g. putting the bit on text control element rather than html input element, and using web_form_control_element rather than web_input_element)? If not, what do you think about copying how the password field bit works?

          Nan Lin

          IIUC type=password is only valid for the <input> element in HTML, that's why it's put in HtmlInputElement and WebInputElement. The sensitive payment data is determined by Autofill in the browser process. I chose TextControlElement and WebFormControlElement to handle both <input> and <textarea> elements uniformly.

          Khushal Sagar

          The browser-side code allows the autofill stack to set it for any form control element (link in the comment above). Based on that I'd say set it on `HTMLFormControlElement`? TextControlElement misses `select` elements for example. Those can be classified as sensitive payment fields as well right?

          Gerrit-Comment-Date: Fri, 23 Jan 2026 22:52:26 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Nan Lin <lin...@chromium.org>
          Comment-In-Reply-To: Philip Rogers <p...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Nan Lin (Gerrit)

          unread,
          Jan 23, 2026, 7:31:38 PMJan 23
          to Ken Buchanan, Chromium IPC Reviews, Khushal Sagar, Shivani Sharma, Philip Rogers, Stephen McGruer, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, ios-r...@chromium.org, ipc-securi...@chromium.org, tmartino+tran...@chromium.org
          Attention needed from Ken Buchanan, Khushal Sagar, Philip Rogers and Stephen McGruer

          Nan Lin added 2 comments

          Patchset-level comments
          Khushal Sagar . unresolved

          Since the data was only available in the browser so far, the redaction is being done during APC proto generation [here](https://source.chromium.org/chromium/chromium/src/+/main:components/optimization_guide/content/browser/page_content_proto_util.cc;l=601;drc=bf712ec1a13783224debb691ba88ad5c15b93194). If the state can instead be sent to the renderer, we shouldn't use the browser-side code so all redaction can happen in the renderer. But I'm not sure how expensive it is to send these messages from browser -> renderer.

          The alternative would be to send geometry for all form controls (which could be potentially sensitive) as a part of APC. That extraction is rare so it's ok but this will be more expensive when we track this geometry through the rendering pipeline (will happen every frame).

          I think this is worth a design doc.

          Nan Lin

          I can write a one pager to compare the two approaches to redact APC. Just a note, we still need the data to be sent to the renderer in order to redact screenshot from the compositor.

          File third_party/blink/public/web/web_form_control_element.h
          Line 171, Patchset 8: void SetHasBeenSensitivePaymentField();
          Philip Rogers . unresolved

          A similar bit for password fields is slightly different (HTMLInputElement::has_been_password_field_, HTMLInputElement::MaybeSetHasBeenPasswordField, WebInputElement::MaybeSetHasBeenPasswordField). One difference is that there is an input type=password that is used to set has_been_password_field_, but otherwise, these features seem pretty similar. Are there reasons for being different (e.g. putting the bit on text control element rather than html input element, and using web_form_control_element rather than web_input_element)? If not, what do you think about copying how the password field bit works?

          Nan Lin

          IIUC type=password is only valid for the <input> element in HTML, that's why it's put in HtmlInputElement and WebInputElement. The sensitive payment data is determined by Autofill in the browser process. I chose TextControlElement and WebFormControlElement to handle both <input> and <textarea> elements uniformly.

          Khushal Sagar

          The browser-side code allows the autofill stack to set it for any form control element (link in the comment above). Based on that I'd say set it on `HTMLFormControlElement`? TextControlElement misses `select` elements for example. Those can be classified as sensitive payment fields as well right?

          Nan Lin

          I followed https://crrev.com/c/7082971 which only redacts text control elements but not select elements. But it makes sense to set the flag on `HTMLFormControlElement` as this is not about content redaction. Updated accordingly, thanks.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Ken Buchanan
          • Khushal Sagar
          • Philip Rogers
          • Stephen McGruer
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I2277284b6c5f574fd5dd2ebd016351c71ff6c78c
            Gerrit-Change-Number: 7511630
            Gerrit-PatchSet: 8
            Gerrit-Owner: Nan Lin <lin...@chromium.org>
            Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
            Gerrit-Reviewer: Nan Lin <lin...@chromium.org>
            Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
            Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
            Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
            Gerrit-CC: Khushal Sagar <khusha...@chromium.org>
            Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
            Gerrit-CC: gwsq
            Gerrit-Attention: Khushal Sagar <khusha...@chromium.org>
            Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
            Gerrit-Attention: Philip Rogers <p...@chromium.org>
            Gerrit-Attention: Ken Buchanan <ke...@chromium.org>
            Gerrit-Comment-Date: Sat, 24 Jan 2026 00:31:32 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Khushal Sagar <khusha...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Philip Rogers (Gerrit)

            unread,
            Jan 23, 2026, 8:56:42 PMJan 23
            to Nan Lin, Ken Buchanan, Chromium IPC Reviews, Khushal Sagar, Shivani Sharma, Stephen McGruer, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, browser-comp...@chromium.org, ios-r...@chromium.org, ipc-securi...@chromium.org, tmartino+tran...@chromium.org
            Attention needed from Ken Buchanan, Khushal Sagar, Nan Lin and Stephen McGruer

            Philip Rogers voted and added 2 comments

            Votes added by Philip Rogers

            Code-Review+1

            2 comments

            Patchset-level comments
            File-level comment, Patchset 9 (Latest):
            Philip Rogers . resolved

            LGTM

            File third_party/blink/public/web/web_form_control_element.h
            Line 171, Patchset 8: void SetHasBeenSensitivePaymentField();
            Philip Rogers . resolved

            A similar bit for password fields is slightly different (HTMLInputElement::has_been_password_field_, HTMLInputElement::MaybeSetHasBeenPasswordField, WebInputElement::MaybeSetHasBeenPasswordField). One difference is that there is an input type=password that is used to set has_been_password_field_, but otherwise, these features seem pretty similar. Are there reasons for being different (e.g. putting the bit on text control element rather than html input element, and using web_form_control_element rather than web_input_element)? If not, what do you think about copying how the password field bit works?

            Nan Lin

            IIUC type=password is only valid for the <input> element in HTML, that's why it's put in HtmlInputElement and WebInputElement. The sensitive payment data is determined by Autofill in the browser process. I chose TextControlElement and WebFormControlElement to handle both <input> and <textarea> elements uniformly.

            Khushal Sagar

            The browser-side code allows the autofill stack to set it for any form control element (link in the comment above). Based on that I'd say set it on `HTMLFormControlElement`? TextControlElement misses `select` elements for example. Those can be classified as sensitive payment fields as well right?

            Nan Lin

            I followed https://crrev.com/c/7082971 which only redacts text control elements but not select elements. But it makes sense to set the flag on `HTMLFormControlElement` as this is not about content redaction. Updated accordingly, thanks.

            Philip Rogers

            Done

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Ken Buchanan
            • Khushal Sagar
            • Nan Lin
            • Stephen McGruer
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • requirement is not satisfiedNo-Unresolved-Comments
              • requirement is not satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I2277284b6c5f574fd5dd2ebd016351c71ff6c78c
              Gerrit-Change-Number: 7511630
              Gerrit-PatchSet: 9
              Gerrit-Owner: Nan Lin <lin...@chromium.org>
              Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
              Gerrit-Reviewer: Nan Lin <lin...@chromium.org>
              Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
              Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
              Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
              Gerrit-CC: Khushal Sagar <khusha...@chromium.org>
              Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
              Gerrit-CC: gwsq
              Gerrit-Attention: Nan Lin <lin...@chromium.org>
              Gerrit-Attention: Khushal Sagar <khusha...@chromium.org>
              Gerrit-Attention: Stephen McGruer <smcg...@chromium.org>
              Gerrit-Attention: Ken Buchanan <ke...@chromium.org>
              Gerrit-Comment-Date: Sat, 24 Jan 2026 01:56:30 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              Comment-In-Reply-To: Nan Lin <lin...@chromium.org>
              Comment-In-Reply-To: Khushal Sagar <khusha...@chromium.org>
              Comment-In-Reply-To: Philip Rogers <p...@chromium.org>
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy
              Reply all
              Reply to author
              Forward
              0 new messages