Replace `IsMaskedStorageSupported` with specialized predicates [chromium/src : main]

0 views
Skip to first unread message

Florian Leimgruber (Gerrit)

unread,
3:13 AM (7 hours ago) 3:13 AM
to Tobiasz Ciepliński, Chromium LUCI CQ, chromium...@chromium.org, browser-comp...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
Attention needed from Tobiasz Ciepliński

Florian Leimgruber added 8 comments

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Florian Leimgruber . resolved

Thanks! LGTM overall, except for the comment in entity_data_manager_android.cc

File chrome/browser/autofill/android/entity_data_manager_android.cc
Line 202, Patchset 4 (Latest): // TODO(crbug.com/501037715): Handle the eligibility in
// `AddOrUpdateEntityInstance` using C++ objects and drop the
// targeted_record_type parameter.
Florian Leimgruber . unresolved

I don't think that works. When we initially show the UI, we determine where we'd like to save to. But before the user confirms the save, eligiblity can change (e.g, by turning off syncing of passes in a new tab). `targeted_record_type` represents what the user accepted, while the recomputed eligibility after confirming represents the current eligibility.

Thus, the change you made below is incorrect.

File components/autofill/core/browser/data_model/autofill_ai/entity_instance.h
Line 528, Patchset 4 (Latest):// combination is asynchronous.
Florian Leimgruber . unresolved

Can you add a comment like "if saving an entity of the given (type, record_type) is not supported, the function returns false"? IIUC, this is the behavior - because kAA entities are not saveable, right?

Line 523, Patchset 4 (Latest): return record_type == EntityInstance::RecordType::kServerWallet &&
!IsWalletPrivatePass(type, record_type);
Florian Leimgruber . unresolved

This would consider server orders and shipments as public passes (..which I guess is consistent with the current behavior). However, these two entity types were technically introduced after the private passes integrations and I'm not sure if they should be considered public passes. At least at the moment, we don't get any kServerWallet orders or shipments. WDYT about considering them neither private nor public passes - would that break anything?

File components/autofill/core/browser/data_model/autofill_ai/entity_instance_unittest.cc
Line 634, Patchset 4 (Latest):TEST_P(AutofillEntityInstanceTest, IsWalletPrivatePassSelectTypes) {
Florian Leimgruber . unresolved

unrelated nit: Should this be "Selected"?

File components/autofill/core/browser/integrators/autofill_ai/autofill_ai_wallet_utils.cc
Line 127, Patchset 4 (Parent): CHECK_EQ(entity.record_type(), EntityInstance::RecordType::kServerWallet);
Florian Leimgruber . unresolved

I think this CHECK() is still legitimate - especially if we consider order and shipments neither public nor private pass.

File components/autofill/core/browser/permissions/autofill_ai/autofill_ai_permission_utils.cc
Line 110, Patchset 4 (Latest): if (IsWalletPublicPass(*entity_type,
Florian Leimgruber . unresolved

Would an early return for `!IsWalletPrivatePass()` make more sense? Now the case where an entity type is neither public nor private is implicitly handled via the && below.

Same comment below about the `AutofillAiAction::kImportToWallet` case.

File ios/chrome/browser/settings/autofill/autofill_ai/coordinator/autofill_ai_entity_edit_mediator.mm
Line 235, Patchset 4 (Latest): BOOL isWalletPrivatePass = autofill::IsWalletPrivatePass(
Florian Leimgruber . unresolved

Should this use `IsSavingAsynchronous()`?

Open in Gerrit

Related details

Attention is currently required from:
  • Tobiasz Ciepliński
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: I048f260e53d8492927e8143fc09d9656fe044be9
Gerrit-Change-Number: 7852537
Gerrit-PatchSet: 4
Gerrit-Owner: Tobiasz Ciepliński <tob...@google.com>
Gerrit-Reviewer: Florian Leimgruber <fleim...@google.com>
Gerrit-Reviewer: Tobiasz Ciepliński <tob...@google.com>
Gerrit-Attention: Tobiasz Ciepliński <tob...@google.com>
Gerrit-Comment-Date: Mon, 18 May 2026 07:13:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages