Add a feature flag to use the Rust Pix QR code validator [chromium/src : main]

0 views
Skip to first unread message

Daniel Cheng (Gerrit)

unread,
Dec 10, 2025, 3:22:19 PM (10 days ago) Dec 10
to Daniel Cheng, Chromium Metrics Reviews, AyeAye, Siddharth Shah, Stephen McGruer, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org

Daniel Cheng added 1 comment

Patchset-level comments
File-level comment, Patchset 43 (Latest):
Daniel Cheng . unresolved

PTAL. I've updated this to have more metrics and all that fun stuff.

I also log comparative metrics for the C++ validator case, so we can see if there's any interesting deltas from the Rust validator. The CL description still needs a bit of updating, but overall, this should be in a reviewable state finally. Sorry for the delay!

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I3c19baea20c591115148d168cb67ebeceeb486c2
Gerrit-Change-Number: 7081914
Gerrit-PatchSet: 43
Gerrit-Owner: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Siddharth Shah <sia...@google.com>
Gerrit-Comment-Date: Wed, 10 Dec 2025 20:22:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Stephen McGruer (Gerrit)

unread,
Dec 11, 2025, 10:09:28 AM (9 days ago) Dec 11
to Daniel Cheng, Stephen McGruer, Chromium Metrics Reviews, AyeAye, Siddharth Shah, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
Attention needed from Daniel Cheng and Siddharth Shah

Stephen McGruer voted and added 6 comments

Votes added by Stephen McGruer

Code-Review+1

6 comments

Patchset-level comments
Stephen McGruer . resolved

Thanks for working on this! LGTM modulo nits and also please update the description.

File components/facilitated_payments/core/browser/facilitated_payments_driver.cc
Line 27, Patchset 43 (Latest):// Not all possible result variants are mapped to results for metrics.
Stephen McGruer . unresolved

Can you explain the 'why' for this decision in the comment, too? (I assume its just because they will happen too frequently for random copied strings that aren't QR codes at all, so no metric should be logged)

Line 79, Patchset 43 (Latest): std::optional<PixCodeRustValidationResult> rust_validation_result =
Stephen McGruer . unresolved

Nit; maybe explain in a comment why we always run the rust validator even if the flag is not enabled?

File components/facilitated_payments/core/browser/pix_manager_unittest.cc
Line 151, Patchset 43 (Latest): enabled_features.push_back(kEnablePixAccountLinking);
Stephen McGruer . resolved

Optional nit; could be inlined into line 149, right?

Line 167, Patchset 43 (Latest): testing::Values(false, true));
Stephen McGruer . unresolved

`testing::Bool`

File components/facilitated_payments/core/metrics/facilitated_payments_metrics.h
Line 209, Patchset 43 (Latest): kNonFinalCrc = 4,
Stephen McGruer . unresolved

Can you remind me what error is thrown if the crc data object is missing entirely?

Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
  • Siddharth Shah
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I3c19baea20c591115148d168cb67ebeceeb486c2
    Gerrit-Change-Number: 7081914
    Gerrit-PatchSet: 43
    Gerrit-Owner: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Siddharth Shah <sia...@google.com>
    Gerrit-Attention: Siddharth Shah <sia...@google.com>
    Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
    Gerrit-Comment-Date: Thu, 11 Dec 2025 15:09:19 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Daniel Cheng (Gerrit)

    unread,
    Dec 11, 2025, 12:10:35 PM (9 days ago) Dec 11
    to Daniel Cheng, Stephen McGruer, Chromium Metrics Reviews, AyeAye, Siddharth Shah, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
    Attention needed from Siddharth Shah

    Daniel Cheng added 7 comments

    File components/facilitated_payments/core/browser/facilitated_payments_driver.cc
    Line 27, Patchset 43:// Not all possible result variants are mapped to results for metrics.
    Stephen McGruer . resolved

    Can you explain the 'why' for this decision in the comment, too? (I assume its just because they will happen too frequently for random copied strings that aren't QR codes at all, so no metric should be logged)

    Daniel Cheng

    Done

    Line 46, Patchset 23: if (!base::FeatureList::IsEnabled(kUseRustPixCodeValidator) &&
    !PixCodeValidator::ContainsPixIdentifier(copied_text_utf8)) {
    return;
    }
    Siddharth Shah . resolved

    I think we should still continue to check ContainsPixIdentifier as otherwise we'd doing unnecessary work in the PixManager to check the allowlist every time the user copies some text in Chrome.

    Our current histogram logs kInvalid for less than 1% of events and would be valuable to continue to log it incase there is some issue in our parsing logic or if the code format changes at some point and that number goes up.

    Daniel Cheng

    `ContainsPixIdentifier()` requires case-folding though, and in the current implementation, requires copying the entire string. The Rust implementation would similarly have to copy the entire string just to casefold for the case-insensitive substring search.

    Parsing has many early-rejection points. So I don't actually think there's actually a performance win.

    Siddharth Shah

    When some text containing a Pix identifier but not a valid Pix code is copied, I agree there might not be significant performance win. However, for text that does not contain the Pix identifier

    C++ code: we perform case folding + substring search.
    Rust code: we'll be loading the PixManager and doing allowlist check followed by the validator.

    I think the memory overhead footprint and execution time for the later might be more. WDYT?

    Also we'd lose metrics for when a Pix identifier will be lost. If you think that there isn't any performance gain then, I'd propose that we add a PixQrCodeType for Invalid for codes that contain the Pix identifier but fails validation somewhere.

    @smcg...@chromium.org please share your thoughts as well. Thanks!

    Daniel Cheng

    OK that reminds me why I structured things the way I did originally: I didn't want to instantiate the PixManager. But the problem with that is that it was hard to log metrics. I was lazy when I addressed @smcg...@chromium.org's comment about metrics and folded all the work back into `PixManager`.

    I'll pull the Rust parsing back out separately so we don't instantiate the `PixManager` except for valid codes and add some helpers to log the metrics from outside `PixManager`, but it will be more complicated in the short-term.

    I don't think it's useful to say "this thing had a case-insensitive substring that looked like a Pix code but it didn't actually parse as valid". Our parser/validator is very very forgiving.

    If we need more metrics, it seems like it'd be far more useful if the validator returned more concrete reasons for failures (e.g. empty additional data or no globally-unique identifier or valid emvco mpm qrcode but not Pix).

    Let me ask you this: if we didn't have the data decoder process from the start, would we still have had a `ContainsPixIdentifier()` function? I'm not sure we would have had it at all.

    Siddharth Shah

    I don't think it's useful to say "this thing had a case-insensitive substring that looked like a Pix code but it didn't actually parse as valid". Our parser/validator is very very forgiving.

    I think this helps if the rate of this metric changes significantly after a Chrome release or a spec update and make us investigate further. I think this is the bare minimum but having more granular metrics like you suggested would be even better.

    Let me ask you this: if we didn't have the data decoder process from the start, would we still have had a ContainsPixIdentifier() function? I'm not sure we would have had it at all.

    I think so. In the past few months, we've looked at PixFlowExitedReason::kInvalidCode multiple times which has helped product decide on supporting static codes. We also have a metrics funnel that relies on this metric. https://screenshot.googleplex.com/6ih4KpKJWYZxsNF

    Daniel Cheng

    I think so. In the past few months, we've looked at PixFlowExitedReason::kInvalidCode multiple times which has helped product decide on supporting static codes. We also have a metrics funnel that relies on this metric. https://screenshot.googleplex.com/6ih4KpKJWYZxsNF

    OK, but I think that means we need better metrics, and not that we specifically need the `kInvalid` metric. For example, the "Pix code but not dynamic" case could have been explicitly detected, and the metric would have been more precise. We can add a distinct enum category for "valid EMVCo merchant-presented mode QRCode that is a Pix code but doesn't validate due to <x|y|z>". Would that address your concerns?

    Siddharth Shah

    Yes, I think should be sufficient. Thanks!

    Daniel Cheng

    Acknowledged

    Line 79, Patchset 43: std::optional<PixCodeRustValidationResult> rust_validation_result =
    Stephen McGruer . resolved

    Nit; maybe explain in a comment why we always run the rust validator even if the flag is not enabled?

    Daniel Cheng

    Done

    File components/facilitated_payments/core/browser/pix_manager.cc
    Line 121, Patchset 23: // TODO(dcheng): Should this log `kInvalidCode`? This would be quite
    Daniel Cheng . resolved

    Previously we'd log this at line 169 for the C++ version. But I feel like it's very spammy.

    But that being said, we're still logging `kInvalid` for every single validation attempt... is that something that's still valuable with the Rust validator?

    The difference here is:
    1. C++ does a very basic test to check if the thing on the clipboard might be a QR code. It early-rejects anything that doesn't pass the basic test.
    2. Rust doesn't need to do the very basic test. But that means we report invalid for every single clipboard copy if the merchant is allowlisted.

    I'm not sure if the allowlisting is going to stay forever–I assume not. So... do we need to log kInvalid at all? If we do, what specific criteria should be used for invalid?

    The main reason I didn't implement the early-rejection in Rust is I found it a bit confusing, and it's also impossible to implement efficiently–because there's no non-allocating way to do case-insensitive substring search in either Rust or C++ without implementing something fancy.

    Daniel Cheng

    Acknowledged

    File components/facilitated_payments/core/browser/pix_manager_unittest.cc
    Line 151, Patchset 43: enabled_features.push_back(kEnablePixAccountLinking);
    Stephen McGruer . resolved

    Optional nit; could be inlined into line 149, right?

    Daniel Cheng

    Good point, done.

    Line 167, Patchset 43: testing::Values(false, true));
    Stephen McGruer . resolved

    `testing::Bool`

    Daniel Cheng

    Oh I forgot about this! Thanks!

    File components/facilitated_payments/core/metrics/facilitated_payments_metrics.h
    Line 209, Patchset 43: kNonFinalCrc = 4,
    Stephen McGruer . resolved

    Can you remind me what error is thrown if the crc data object is missing entirely?

    Attention is currently required from:
    • Siddharth Shah
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I3c19baea20c591115148d168cb67ebeceeb486c2
    Gerrit-Change-Number: 7081914
    Gerrit-PatchSet: 45
    Gerrit-Owner: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Siddharth Shah <sia...@google.com>
    Gerrit-Attention: Siddharth Shah <sia...@google.com>
    Gerrit-Comment-Date: Thu, 11 Dec 2025 17:10:19 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Siddharth Shah <sia...@google.com>
    Comment-In-Reply-To: Stephen McGruer <smcg...@chromium.org>
    Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Daniel Cheng (Gerrit)

    unread,
    Dec 15, 2025, 6:44:26 PM (4 days ago) Dec 15
    to Daniel Cheng, Longsheng Yin, Stephen McGruer, Chromium Metrics Reviews, AyeAye, Siddharth Shah, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
    Attention needed from Longsheng Yin and Siddharth Shah

    Daniel Cheng added 1 comment

    Patchset-level comments
    File-level comment, Patchset 46 (Latest):
    Daniel Cheng . unresolved

    +siashah is OOO for a bit.
    +longshen, please let me know if you have any feedback that I should address before landing. Thank you!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Longsheng Yin
    • Siddharth Shah
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I3c19baea20c591115148d168cb67ebeceeb486c2
    Gerrit-Change-Number: 7081914
    Gerrit-PatchSet: 46
    Gerrit-Owner: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Longsheng Yin <long...@google.com>
    Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Siddharth Shah <sia...@google.com>
    Gerrit-Attention: Siddharth Shah <sia...@google.com>
    Gerrit-Attention: Longsheng Yin <long...@google.com>
    Gerrit-Comment-Date: Mon, 15 Dec 2025 23:44:10 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Daniel Cheng (Gerrit)

    unread,
    Dec 17, 2025, 5:40:19 PM (2 days ago) Dec 17
    to Daniel Cheng, Olivia Saul, Longsheng Yin, Stephen McGruer, Chromium Metrics Reviews, AyeAye, Siddharth Shah, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
    Attention needed from Longsheng Yin, Olivia Saul and Siddharth Shah

    Daniel Cheng added 1 comment

    Patchset-level comments
    File-level comment, Patchset 48 (Latest):
    Daniel Cheng . resolved

    @os...@google.com can you help review the metrics changes? Thanks!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Longsheng Yin
    • Olivia Saul
    • Siddharth Shah
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I3c19baea20c591115148d168cb67ebeceeb486c2
    Gerrit-Change-Number: 7081914
    Gerrit-PatchSet: 48
    Gerrit-Owner: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Longsheng Yin <long...@google.com>
    Gerrit-Reviewer: Olivia Saul <os...@google.com>
    Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Siddharth Shah <sia...@google.com>
    Gerrit-Attention: Siddharth Shah <sia...@google.com>
    Gerrit-Attention: Longsheng Yin <long...@google.com>
    Gerrit-Attention: Olivia Saul <os...@google.com>
    Gerrit-Comment-Date: Wed, 17 Dec 2025 22:40:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Olivia Saul (Gerrit)

    unread,
    Dec 17, 2025, 5:48:02 PM (2 days ago) Dec 17
    to Daniel Cheng, Olivia Saul, Longsheng Yin, Stephen McGruer, Chromium Metrics Reviews, AyeAye, Siddharth Shah, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
    Attention needed from Daniel Cheng, Longsheng Yin and Siddharth Shah

    Olivia Saul voted and added 2 comments

    Votes added by Olivia Saul

    Code-Review+1

    2 comments

    Patchset-level comments
    Olivia Saul . resolved

    LGTM w/comment for tools/metrics/. Thanks!

    File tools/metrics/histograms/metadata/facilitated_payments/histograms.xml
    Line 548, Patchset 48 (Latest):<histogram name="FacilitatedPayments.Pix.PaymentCodeValidation.RustResult"
    Olivia Saul . unresolved

    I've added a row for this on our go/payments-autofill-uma spreadsheet: [Link](https://docs.google.com/spreadsheets/d/1R5m1KfGLRe3YBvMnjeJ_xeiDQvzTpgx4T0tZioWoqPE/edit?resourcekey=0-TuqaTwhINXPX1vhm5IQ2zA&gid=0#gid=0&range=270:270). Can you please leave comments in the doc for what content should go in columns C and D? I'll copy your comments into the doc itself. Thank you!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Daniel Cheng
    • Longsheng Yin
    • Siddharth Shah
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I3c19baea20c591115148d168cb67ebeceeb486c2
    Gerrit-Change-Number: 7081914
    Gerrit-PatchSet: 48
    Gerrit-Owner: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Longsheng Yin <long...@google.com>
    Gerrit-Reviewer: Olivia Saul <os...@google.com>
    Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Siddharth Shah <sia...@google.com>
    Gerrit-Attention: Siddharth Shah <sia...@google.com>
    Gerrit-Attention: Longsheng Yin <long...@google.com>
    Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
    Gerrit-Comment-Date: Wed, 17 Dec 2025 22:47:46 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Longsheng Yin (Gerrit)

    unread,
    Dec 17, 2025, 8:17:50 PM (2 days ago) Dec 17
    to Daniel Cheng, Olivia Saul, Stephen McGruer, Chromium Metrics Reviews, AyeAye, Siddharth Shah, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
    Attention needed from Daniel Cheng and Siddharth Shah

    Longsheng Yin voted and added 1 comment

    Votes added by Longsheng Yin

    Code-Review+1

    1 comment

    Patchset-level comments
    Longsheng Yin . resolved

    Thanks!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Daniel Cheng
    • Siddharth Shah
    Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
    Gerrit-Comment-Date: Thu, 18 Dec 2025 01:17:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Daniel Cheng (Gerrit)

    unread,
    Dec 18, 2025, 7:03:02 PM (2 days ago) Dec 18
    to Daniel Cheng, Longsheng Yin, Olivia Saul, Stephen McGruer, Chromium Metrics Reviews, AyeAye, Siddharth Shah, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
    Attention needed from Siddharth Shah

    Daniel Cheng added 1 comment

    File tools/metrics/histograms/metadata/facilitated_payments/histograms.xml
    Line 548, Patchset 48:<histogram name="FacilitatedPayments.Pix.PaymentCodeValidation.RustResult"
    Olivia Saul . resolved

    I've added a row for this on our go/payments-autofill-uma spreadsheet: [Link](https://docs.google.com/spreadsheets/d/1R5m1KfGLRe3YBvMnjeJ_xeiDQvzTpgx4T0tZioWoqPE/edit?resourcekey=0-TuqaTwhINXPX1vhm5IQ2zA&gid=0#gid=0&range=270:270). Can you please leave comments in the doc for what content should go in columns C and D? I'll copy your comments into the doc itself. Thank you!

    Daniel Cheng

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Siddharth Shah
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I3c19baea20c591115148d168cb67ebeceeb486c2
    Gerrit-Change-Number: 7081914
    Gerrit-PatchSet: 49
    Gerrit-Owner: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Longsheng Yin <long...@google.com>
    Gerrit-Reviewer: Olivia Saul <os...@google.com>
    Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Siddharth Shah <sia...@google.com>
    Gerrit-Attention: Siddharth Shah <sia...@google.com>
    Gerrit-Comment-Date: Fri, 19 Dec 2025 00:02:45 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Olivia Saul <os...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Daniel Cheng (Gerrit)

    unread,
    Dec 18, 2025, 7:03:22 PM (2 days ago) Dec 18
    to Daniel Cheng, Longsheng Yin, Olivia Saul, Stephen McGruer, Chromium Metrics Reviews, AyeAye, Siddharth Shah, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
    Attention needed from Siddharth Shah

    Daniel Cheng voted and added 2 comments

    Votes added by Daniel Cheng

    Commit-Queue+2

    2 comments

    Patchset-level comments
    File-level comment, Patchset 43:
    Daniel Cheng . resolved

    PTAL. I've updated this to have more metrics and all that fun stuff.

    I also log comparative metrics for the C++ validator case, so we can see if there's any interesting deltas from the Rust validator. The CL description still needs a bit of updating, but overall, this should be in a reviewable state finally. Sorry for the delay!

    Daniel Cheng

    Acknowledged

    File-level comment, Patchset 46:
    Daniel Cheng . resolved

    +siashah is OOO for a bit.
    +longshen, please let me know if you have any feedback that I should address before landing. Thank you!

    Daniel Cheng

    Acknowledged

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Siddharth Shah
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I3c19baea20c591115148d168cb67ebeceeb486c2
      Gerrit-Change-Number: 7081914
      Gerrit-PatchSet: 49
      Gerrit-Owner: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: Longsheng Yin <long...@google.com>
      Gerrit-Reviewer: Olivia Saul <os...@google.com>
      Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Siddharth Shah <sia...@google.com>
      Gerrit-Attention: Siddharth Shah <sia...@google.com>
      Gerrit-Comment-Date: Fri, 19 Dec 2025 00:03:06 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Dec 18, 2025, 7:07:15 PM (2 days ago) Dec 18
      to Daniel Cheng, Longsheng Yin, Olivia Saul, Stephen McGruer, Chromium Metrics Reviews, AyeAye, Siddharth Shah, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org

      Chromium LUCI CQ submitted the change

      Unreviewed changes

      48 is the latest approved patch-set.
      No files were changed between the latest approved patch-set and the submitted one.

      Change information

      Commit message:
      Add a feature flag to use the Rust Pix QR code validator

      Currently, the payments driver performs two tests when checking for a Pix
      QR code on the clipboard: the first is a fast test that is imprecise but
      considered safe to implement in C++, while the second check actually
      tries to parse it in C++ in the utility process.

      This adds a feature flag to optionally enable the Rust validator: with
      the Rust validator, all validation is in-process, so no quick but
      imprecise test is needed. To support a gradual transition, this CL adds
      a feature flag for using the Rust validator. When the feature flag is
      enabled, the payments driver only uses the Rust validator. When the
      feature flag is disabled, the payments driver uses the original C++
      validator, but also performs an additional Rust validation so that the
      results can be compared.

      Finally, add additional metrics:
      - The Rust validator has a more fine-grained set of results, so add a
      new histogram and enum definition when the Rust validator feature is
      enabled.
      - The C++ validator also logs the result of Rust validation (using an
      approximate mapping of the Rust result to the original metrics enum)
      to validate that there are no significant differences between the two.
      Bug: 454668204
      Change-Id: I3c19baea20c591115148d168cb67ebeceeb486c2
      Reviewed-by: Olivia Saul <os...@google.com>
      Reviewed-by: Stephen McGruer <smcg...@chromium.org>
      Commit-Queue: Daniel Cheng <dch...@chromium.org>
      Reviewed-by: Longsheng Yin <long...@google.com>
      Cr-Commit-Position: refs/heads/main@{#1560903}
      Files:
      • M components/facilitated_payments/core/browser/BUILD.gn
      • M components/facilitated_payments/core/browser/facilitated_payments_driver.cc
      • M components/facilitated_payments/core/browser/facilitated_payments_driver_unittest.cc
      • M components/facilitated_payments/core/browser/pix_manager.cc
      • M components/facilitated_payments/core/browser/pix_manager.h
      • M components/facilitated_payments/core/browser/pix_manager_unittest.cc
      • M components/facilitated_payments/core/features/features.cc
      • M components/facilitated_payments/core/features/features.h
      • M components/facilitated_payments/core/metrics/facilitated_payments_metrics.cc
      • M components/facilitated_payments/core/metrics/facilitated_payments_metrics.h
      • M components/facilitated_payments/core/metrics/facilitated_payments_metrics_unittest.cc
      • M components/facilitated_payments/core/validation/BUILD.gn
      • M tools/metrics/histograms/metadata/facilitated_payments/enums.xml
      • M tools/metrics/histograms/metadata/facilitated_payments/histograms.xml
      Change size: L
      Delta: 14 files changed, 399 insertions(+), 101 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Longsheng Yin, +1 by Olivia Saul, +1 by Stephen McGruer
      Open in Gerrit
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: merged
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I3c19baea20c591115148d168cb67ebeceeb486c2
      Gerrit-Change-Number: 7081914
      Gerrit-PatchSet: 50
      Gerrit-Owner: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: Longsheng Yin <long...@google.com>
      Gerrit-Reviewer: Olivia Saul <os...@google.com>
      Gerrit-Reviewer: Stephen McGruer <smcg...@chromium.org>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages