[ScanCard IOS] Update ShowCreditCardLocalSaveAndFillDialog and ShowCreditCardUploadSaveAndFillDialog to trigger scanning flow [chromium/src : main]

0 views
Skip to first unread message

yiwen qian (Gerrit)

unread,
Feb 13, 2026, 9:48:26 PMFeb 13
to Qihui Zhao, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-me...@chromium.org, armalhotra+a...@google.com, browser-comp...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, osaul+aut...@google.com, shgar+aut...@google.com, siashah+au...@chromium.org, siyua+aut...@chromium.org, sloboda...@chromium.org, tmartino+tran...@chromium.org, vinnypersky+...@google.com
Attention needed from Qihui Zhao

yiwen qian voted and added 1 comment

Votes added by yiwen qian

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
yiwen qian . resolved

Hi Qihui, could you please review this CL? Thank you!

Open in Gerrit

Related details

Attention is currently required from:
  • Qihui Zhao
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: I0b53c34c87c1294c34f0642f0b889a85190d70ba
Gerrit-Change-Number: 7577676
Gerrit-PatchSet: 6
Gerrit-Owner: yiwen qian <yiwe...@chromium.org>
Gerrit-Reviewer: Qihui Zhao <qihu...@google.com>
Gerrit-Reviewer: yiwen qian <yiwe...@chromium.org>
Gerrit-Attention: Qihui Zhao <qihu...@google.com>
Gerrit-Comment-Date: Sat, 14 Feb 2026 02:48:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Qihui Zhao (Gerrit)

unread,
Feb 27, 2026, 7:14:00 PM (6 days ago) Feb 27
to yiwen qian, Code Review Nudger, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-me...@chromium.org, armalhotra+a...@google.com, browser-comp...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, osaul+aut...@google.com, shgar+aut...@google.com, siashah+au...@chromium.org, siyua+aut...@chromium.org, sloboda...@chromium.org, tmartino+tran...@chromium.org, vinnypersky+...@google.com
Attention needed from yiwen qian

Qihui Zhao added 3 comments

File ios/chrome/browser/autofill/ui_bundled/ios_chrome_payments_autofill_client.mm
Line 615, Patchset 9 (Latest): options.show_prompt = true;
Qihui Zhao . unresolved

Here and below, I don't think we need to set bool, `ShouldShowSaveCardBottomSheet` in autofill_save_card_ui_info will return true on `kScanCardSaveAndFill`.

Line 620, Patchset 9 (Latest): AutofillSaveCardUiInfo::CreateForLocalSave(options, card),
Qihui Zhao . unresolved

Here and below, when creating the AutofillSaveCardUiInfo, there are a lot of settings that needs card fields [here](https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/payments/autofill_save_card_ui_info.cc;drc=56c66e417c83e2096a4e4e8a5c4ab7bbd525c9f3;l=107), will it crash on empty field?

Open in Gerrit

Related details

Attention is currently required from:
  • yiwen qian
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: I0b53c34c87c1294c34f0642f0b889a85190d70ba
    Gerrit-Change-Number: 7577676
    Gerrit-PatchSet: 9
    Gerrit-Owner: yiwen qian <yiwe...@chromium.org>
    Gerrit-Reviewer: Qihui Zhao <qihu...@google.com>
    Gerrit-Reviewer: yiwen qian <yiwe...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-Attention: yiwen qian <yiwe...@chromium.org>
    Gerrit-Comment-Date: Sat, 28 Feb 2026 00:13:56 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    yiwen qian (Gerrit)

    unread,
    Feb 28, 2026, 2:23:03 AM (6 days ago) Feb 28
    to Code Review Nudger, Qihui Zhao, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-me...@chromium.org, armalhotra+a...@google.com, browser-comp...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, osaul+aut...@google.com, shgar+aut...@google.com, siashah+au...@chromium.org, siyua+aut...@chromium.org, sloboda...@chromium.org, tmartino+tran...@chromium.org, vinnypersky+...@google.com
    Attention needed from Qihui Zhao

    yiwen qian added 3 comments

    File ios/chrome/browser/autofill/ui_bundled/ios_chrome_payments_autofill_client.mm
    Line 614, Patchset 9: options.source_feature = SourceFeature::kScanCardSaveAndFill;
    Qihui Zhao . resolved
    yiwen qian

    Done

    Line 615, Patchset 9: options.show_prompt = true;
    Qihui Zhao . resolved

    Here and below, I don't think we need to set bool, `ShouldShowSaveCardBottomSheet` in autofill_save_card_ui_info will return true on `kScanCardSaveAndFill`.

    yiwen qian

    Done

    Line 620, Patchset 9: AutofillSaveCardUiInfo::CreateForLocalSave(options, card),
    Qihui Zhao . unresolved

    Here and below, when creating the AutofillSaveCardUiInfo, there are a lot of settings that needs card fields [here](https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/payments/autofill_save_card_ui_info.cc;drc=56c66e417c83e2096a4e4e8a5c4ab7bbd525c9f3;l=107), will it crash on empty field?

    yiwen qian

    Passing a default-constructed CreditCard object will not cause a crash.

    1. Methods like NetworkForDisplay() or NetworkAndLastFourDigits() all return a std::u16string by value, not by pointer, so there is no risk of a null-pointer dereference.
    2. AutofillSaveCardUiInfo simply copies this empty std::u16string into its card_network property.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Qihui Zhao
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I0b53c34c87c1294c34f0642f0b889a85190d70ba
    Gerrit-Change-Number: 7577676
    Gerrit-PatchSet: 10
    Gerrit-Owner: yiwen qian <yiwe...@chromium.org>
    Gerrit-Reviewer: Qihui Zhao <qihu...@google.com>
    Gerrit-Reviewer: yiwen qian <yiwe...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-Attention: Qihui Zhao <qihu...@google.com>
    Gerrit-Comment-Date: Sat, 28 Feb 2026 07:22:56 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Qihui Zhao <qihu...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Qihui Zhao (Gerrit)

    unread,
    Mar 3, 2026, 12:29:59 PM (2 days ago) Mar 3
    to yiwen qian, Code Review Nudger, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-me...@chromium.org, armalhotra+a...@google.com, browser-comp...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, osaul+aut...@google.com, shgar+aut...@google.com, siashah+au...@chromium.org, siyua+aut...@chromium.org, sloboda...@chromium.org, tmartino+tran...@chromium.org, vinnypersky+...@google.com
    Attention needed from yiwen qian

    Qihui Zhao added 1 comment

    File ios/chrome/browser/autofill/ui_bundled/ios_chrome_payments_autofill_client.mm
    Line 620, Patchset 9: AutofillSaveCardUiInfo::CreateForLocalSave(options, card),
    Qihui Zhao . unresolved

    Here and below, when creating the AutofillSaveCardUiInfo, there are a lot of settings that needs card fields [here](https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/payments/autofill_save_card_ui_info.cc;drc=56c66e417c83e2096a4e4e8a5c4ab7bbd525c9f3;l=107), will it crash on empty field?

    yiwen qian

    Passing a default-constructed CreditCard object will not cause a crash.

    1. Methods like NetworkForDisplay() or NetworkAndLastFourDigits() all return a std::u16string by value, not by pointer, so there is no risk of a null-pointer dereference.
    2. AutofillSaveCardUiInfo simply copies this empty std::u16string into its card_network property.

    Qihui Zhao

    Here and below the default `card` sounds not necessary confused. How about overload a method `CreateForLocalSave` autofill_save_card_ui_info without `card` as a parameter, so that most of the logic can be reused (set strings/button_text, etc), and only call [here](https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/payments/autofill_save_card_ui_info.cc;drc=64820206068b8feaf4b9d4de22362cfcf047b8b6;l=219) for the method with `card` parameter.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • yiwen qian
    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: I0b53c34c87c1294c34f0642f0b889a85190d70ba
    Gerrit-Change-Number: 7577676
    Gerrit-PatchSet: 10
    Gerrit-Owner: yiwen qian <yiwe...@chromium.org>
    Gerrit-Reviewer: Qihui Zhao <qihu...@google.com>
    Gerrit-Reviewer: yiwen qian <yiwe...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-Attention: yiwen qian <yiwe...@chromium.org>
    Gerrit-Comment-Date: Tue, 03 Mar 2026 17:29:50 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: yiwen qian <yiwe...@chromium.org>
    Comment-In-Reply-To: Qihui Zhao <qihu...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    yiwen qian (Gerrit)

    unread,
    Mar 3, 2026, 4:39:32 PM (2 days ago) Mar 3
    to Code Review Nudger, Qihui Zhao, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-me...@chromium.org, armalhotra+a...@google.com, browser-comp...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, osaul+aut...@google.com, shgar+aut...@google.com, siashah+au...@chromium.org, siyua+aut...@chromium.org, sloboda...@chromium.org, tmartino+tran...@chromium.org, vinnypersky+...@google.com
    Attention needed from Qihui Zhao

    yiwen qian added 1 comment

    File ios/chrome/browser/autofill/ui_bundled/ios_chrome_payments_autofill_client.mm
    Line 620, Patchset 9: AutofillSaveCardUiInfo::CreateForLocalSave(options, card),
    Qihui Zhao . resolved

    Here and below, when creating the AutofillSaveCardUiInfo, there are a lot of settings that needs card fields [here](https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/payments/autofill_save_card_ui_info.cc;drc=56c66e417c83e2096a4e4e8a5c4ab7bbd525c9f3;l=107), will it crash on empty field?

    yiwen qian

    Passing a default-constructed CreditCard object will not cause a crash.

    1. Methods like NetworkForDisplay() or NetworkAndLastFourDigits() all return a std::u16string by value, not by pointer, so there is no risk of a null-pointer dereference.
    2. AutofillSaveCardUiInfo simply copies this empty std::u16string into its card_network property.

    Qihui Zhao

    Here and below the default `card` sounds not necessary confused. How about overload a method `CreateForLocalSave` autofill_save_card_ui_info without `card` as a parameter, so that most of the logic can be reused (set strings/button_text, etc), and only call [here](https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/payments/autofill_save_card_ui_info.cc;drc=64820206068b8feaf4b9d4de22362cfcf047b8b6;l=219) for the method with `card` parameter.

    yiwen qian

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Qihui Zhao
    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: I0b53c34c87c1294c34f0642f0b889a85190d70ba
      Gerrit-Change-Number: 7577676
      Gerrit-PatchSet: 11
      Gerrit-Owner: yiwen qian <yiwe...@chromium.org>
      Gerrit-Reviewer: Qihui Zhao <qihu...@google.com>
      Gerrit-Reviewer: yiwen qian <yiwe...@chromium.org>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Qihui Zhao <qihu...@google.com>
      Gerrit-Comment-Date: Tue, 03 Mar 2026 21:39:23 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Qihui Zhao (Gerrit)

      unread,
      Mar 4, 2026, 12:15:58 PM (yesterday) Mar 4
      to yiwen qian, Code Review Nudger, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-me...@chromium.org, armalhotra+a...@google.com, browser-comp...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, osaul+aut...@google.com, shgar+aut...@google.com, siashah+au...@chromium.org, siyua+aut...@chromium.org, sloboda...@chromium.org, tmartino+tran...@chromium.org, vinnypersky+...@google.com
      Attention needed from yiwen qian

      Qihui Zhao voted and added 2 comments

      Votes added by Qihui Zhao

      Code-Review+1

      2 comments

      Patchset-level comments
      File-level comment, Patchset 11 (Latest):
      Qihui Zhao . resolved

      LGTM % 1 comment for test.

      File ios/chrome/browser/autofill/ui_bundled/ios_chrome_payments_autofill_client_unittest.mm
      Line 801, Patchset 11 (Latest): ASSERT_TRUE(model);
      Qihui Zhao . unresolved

      Can we tell the legal message is set somewhere or this flow is for upload save, otherwise, the test seems to be duplicated.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • yiwen qian
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I0b53c34c87c1294c34f0642f0b889a85190d70ba
        Gerrit-Change-Number: 7577676
        Gerrit-PatchSet: 11
        Gerrit-Owner: yiwen qian <yiwe...@chromium.org>
        Gerrit-Reviewer: Qihui Zhao <qihu...@google.com>
        Gerrit-Reviewer: yiwen qian <yiwe...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-Attention: yiwen qian <yiwe...@chromium.org>
        Gerrit-Comment-Date: Wed, 04 Mar 2026 17:15:46 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        yiwen qian (Gerrit)

        unread,
        Mar 4, 2026, 2:36:02 PM (yesterday) Mar 4
        to Tommy Martino, Qihui Zhao, Code Review Nudger, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-me...@chromium.org, armalhotra+a...@google.com, browser-comp...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, osaul+aut...@google.com, shgar+aut...@google.com, siashah+au...@chromium.org, siyua+aut...@chromium.org, sloboda...@chromium.org, tmartino+tran...@chromium.org, vinnypersky+...@google.com
        Attention needed from Qihui Zhao and Tommy Martino

        yiwen qian added 2 comments

        Patchset-level comments
        File-level comment, Patchset 12 (Latest):
        yiwen qian . resolved

        Hi Tommy, could you please review this CL? Thank you!

        File ios/chrome/browser/autofill/ui_bundled/ios_chrome_payments_autofill_client_unittest.mm
        Line 801, Patchset 11: ASSERT_TRUE(model);
        Qihui Zhao . resolved

        Can we tell the legal message is set somewhere or this flow is for upload save, otherwise, the test seems to be duplicated.

        yiwen qian

        Thank you for catching this. This is duplicated!

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Qihui Zhao
        • Tommy Martino
        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: I0b53c34c87c1294c34f0642f0b889a85190d70ba
          Gerrit-Change-Number: 7577676
          Gerrit-PatchSet: 12
          Gerrit-Owner: yiwen qian <yiwe...@chromium.org>
          Gerrit-Reviewer: Qihui Zhao <qihu...@google.com>
          Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
          Gerrit-Reviewer: yiwen qian <yiwe...@chromium.org>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-Attention: Tommy Martino <tmar...@chromium.org>
          Gerrit-Attention: Qihui Zhao <qihu...@google.com>
          Gerrit-Comment-Date: Wed, 04 Mar 2026 19:35:53 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Qihui Zhao <qihu...@google.com>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Tommy Martino (Gerrit)

          unread,
          10:55 AM (5 hours ago) 10:55 AM
          to yiwen qian, Qihui Zhao, Code Review Nudger, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-me...@chromium.org, armalhotra+a...@google.com, browser-comp...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, osaul+aut...@google.com, shgar+aut...@google.com, siashah+au...@chromium.org, siyua+aut...@chromium.org, sloboda...@chromium.org, tmartino+tran...@chromium.org, vinnypersky+...@google.com
          Attention needed from Qihui Zhao and yiwen qian

          Tommy Martino voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Qihui Zhao
          • yiwen qian
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I0b53c34c87c1294c34f0642f0b889a85190d70ba
          Gerrit-Change-Number: 7577676
          Gerrit-PatchSet: 12
          Gerrit-Owner: yiwen qian <yiwe...@chromium.org>
          Gerrit-Reviewer: Qihui Zhao <qihu...@google.com>
          Gerrit-Reviewer: Tommy Martino <tmar...@chromium.org>
          Gerrit-Reviewer: yiwen qian <yiwe...@chromium.org>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-Attention: yiwen qian <yiwe...@chromium.org>
          Gerrit-Attention: Qihui Zhao <qihu...@google.com>
          Gerrit-Comment-Date: Thu, 05 Mar 2026 15:55:17 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages