[HoT][Bling] Populate Identity Docs with entries [chromium/src : main]

0 views
Skip to first unread message

Julia Sobiech (Gerrit)

unread,
May 4, 2026, 9:49:02 AM (23 hours ago) May 4
to Vidhan Jain, chromium...@chromium.org, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, tmartino+tran...@chromium.org, ios-revie...@chromium.org, marq+...@chromium.org, ios-r...@chromium.org, feature-me...@chromium.org
Attention needed from Vidhan Jain

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Vidhan Jain
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: Iac84d3047e87768d020a497f5443b7944b08d017
Gerrit-Change-Number: 7800494
Gerrit-PatchSet: 18
Gerrit-Owner: Julia Sobiech <jsob...@google.com>
Gerrit-Reviewer: Julia Sobiech <jsob...@google.com>
Gerrit-Reviewer: Vidhan Jain <vid...@google.com>
Gerrit-Attention: Vidhan Jain <vid...@google.com>
Gerrit-Comment-Date: Mon, 04 May 2026 13:48:50 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Vidhan Jain (Gerrit)

unread,
May 4, 2026, 11:24:03 AM (21 hours ago) May 4
to Julia Sobiech, chromium...@chromium.org, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, tmartino+tran...@chromium.org, ios-revie...@chromium.org, marq+...@chromium.org, ios-r...@chromium.org, feature-me...@chromium.org
Attention needed from Julia Sobiech

Vidhan Jain added 7 comments

File ios/chrome/browser/settings/autofill/autofill_and_passwords/coordinator/identity_docs_coordinator.mm
Line 56, Patchset 18 (Latest): applicationLocale:locale];
Vidhan Jain . unresolved

The locale can be fetched directly in the mediator since it's not used anywhere else.

File ios/chrome/browser/settings/autofill/autofill_and_passwords/coordinator/identity_docs_mediator.mm
Line 45, Patchset 18 (Latest): raw_ptr<autofill::EntityDataManager> _entityDataManager;
std::unique_ptr<autofill::IOSAutofillEntityDataManagerObserverBridge>
_entityDataManagerObserver;
std::string _applicationLocale;
Vidhan Jain . unresolved

Could you add comments?

Line 80, Patchset 18 (Latest): if ([item isKindOfClass:[AutofillAIEntityItem class]]) {
Vidhan Jain . unresolved

You can streamline this by using `base::apple::ObjCCast`, which internally performs the class check and safely returns `nil` if the type does not match.

```objc
AutofillAIEntityItem* aiItem =
base::apple::ObjCCast<AutofillAIEntityItem>(item);
if (aiItem) {
return aiItem.guid;
}
return std::nullopt;
```
Line 154, Patchset 18 (Latest): symbolName = kPersonTextRectangleSymbol;
Vidhan Jain . unresolved

Is it same as the driver's license icon?

File ios/chrome/browser/settings/autofill/autofill_and_passwords/ui/identity_docs_table_view_controller.mm
Line 53, Patchset 18 (Latest): if (_identityDocsItems.count > 0) {
Vidhan Jain . unresolved

What happens if the user deletes all the items? Is a blank view shown?

Line 81, Patchset 18 (Latest): [self.delegate identityDocsTableViewController:self didSelectItem:item];
Vidhan Jain . unresolved

Currently, the flow is:
UI -> tells Coordinator (user tapped item) -> queries Mediator (what is the ID for this item?) -> Coordinator (navigates).

I think a better approach is to use the mutator pattern.
ViewController can send the tap action to a Mutator (the Mediator), which then extracts the ID and commands its delegate (the Coordinator) to navigate.

WDYT?

Open in Gerrit

Related details

Attention is currently required from:
  • Julia Sobiech
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: Iac84d3047e87768d020a497f5443b7944b08d017
    Gerrit-Change-Number: 7800494
    Gerrit-PatchSet: 18
    Gerrit-Owner: Julia Sobiech <jsob...@google.com>
    Gerrit-Reviewer: Julia Sobiech <jsob...@google.com>
    Gerrit-Reviewer: Vidhan Jain <vid...@google.com>
    Gerrit-Attention: Julia Sobiech <jsob...@google.com>
    Gerrit-Comment-Date: Mon, 04 May 2026 15:23:49 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Vidhan Jain (Gerrit)

    unread,
    May 4, 2026, 11:25:39 AM (21 hours ago) May 4
    to Julia Sobiech, chromium...@chromium.org, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, tmartino+tran...@chromium.org, ios-revie...@chromium.org, marq+...@chromium.org, ios-r...@chromium.org, feature-me...@chromium.org
    Attention needed from Julia Sobiech

    Vidhan Jain added 1 comment

    Patchset-level comments
    File-level comment, Patchset 18 (Latest):
    Vidhan Jain . unresolved

    Could you also add some unit tests?

    Gerrit-Comment-Date: Mon, 04 May 2026 15:25:28 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Julia Sobiech (Gerrit)

    unread,
    7:39 AM (1 hour ago) 7:39 AM
    to Vidhan Jain, chromium...@chromium.org, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, tmartino+tran...@chromium.org, ios-revie...@chromium.org, marq+...@chromium.org, ios-r...@chromium.org, feature-me...@chromium.org
    Attention needed from Vidhan Jain

    Julia Sobiech added 8 comments

    Patchset-level comments
    File-level comment, Patchset 18:
    Vidhan Jain . resolved

    Could you also add some unit tests?

    Julia Sobiech

    Done, since it currently only displays the data created elsewhere, more tests will be added as new functionalities are introduced within the page.

    File ios/chrome/browser/settings/autofill/autofill_and_passwords/coordinator/identity_docs_coordinator.mm
    Line 56, Patchset 18: applicationLocale:locale];
    Vidhan Jain . resolved

    The locale can be fetched directly in the mediator since it's not used anywhere else.

    Julia Sobiech

    Done

    File ios/chrome/browser/settings/autofill/autofill_and_passwords/coordinator/identity_docs_mediator.mm
    Line 45, Patchset 18: raw_ptr<autofill::EntityDataManager> _entityDataManager;

    std::unique_ptr<autofill::IOSAutofillEntityDataManagerObserverBridge>
    _entityDataManagerObserver;
    std::string _applicationLocale;
    Vidhan Jain . resolved

    Could you add comments?

    Julia Sobiech

    Done!

    Line 80, Patchset 18: if ([item isKindOfClass:[AutofillAIEntityItem class]]) {
    Vidhan Jain . resolved

    You can streamline this by using `base::apple::ObjCCast`, which internally performs the class check and safely returns `nil` if the type does not match.

    ```objc
    AutofillAIEntityItem* aiItem =
    base::apple::ObjCCast<AutofillAIEntityItem>(item);
    if (aiItem) {
    return aiItem.guid;
    }
    return std::nullopt;
    ```
    Julia Sobiech

    Done, logic altered after the introduction of the Mediator

    Line 154, Patchset 18: symbolName = kPersonTextRectangleSymbol;
    Vidhan Jain . resolved

    Is it same as the driver's license icon?

    Julia Sobiech

    Yes, the icons should be the same. I simplified the switch statement to reflect that.

    File ios/chrome/browser/settings/autofill/autofill_and_passwords/ui/identity_docs_table_view_controller.mm
    Line 53, Patchset 18: if (_identityDocsItems.count > 0) {
    Vidhan Jain . resolved

    What happens if the user deletes all the items? Is a blank view shown?

    Julia Sobiech

    Yes, at a later stage, data will be divided by types but to align with the present logic in addresses, we won't show empty titles or tables when no data is present. Currently we're left with an empty page: https://screenshot.googleplex.com/3JycYAnDLy7QEQx.png

    Line 68, Patchset 18: [self reloadData];
    Vidhan Jain . resolved
    Julia Sobiech

    Done, thanks!

    Line 81, Patchset 18: [self.delegate identityDocsTableViewController:self didSelectItem:item];
    Vidhan Jain . resolved

    Currently, the flow is:
    UI -> tells Coordinator (user tapped item) -> queries Mediator (what is the ID for this item?) -> Coordinator (navigates).

    I think a better approach is to use the mutator pattern.
    ViewController can send the tap action to a Mutator (the Mediator), which then extracts the ID and commands its delegate (the Coordinator) to navigate.

    WDYT?

    Julia Sobiech

    Great, I think it indeed makes more sense as the encapsulation is stronger and clearer.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Vidhan Jain
    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: Iac84d3047e87768d020a497f5443b7944b08d017
      Gerrit-Change-Number: 7800494
      Gerrit-PatchSet: 21
      Gerrit-Owner: Julia Sobiech <jsob...@google.com>
      Gerrit-Reviewer: Julia Sobiech <jsob...@google.com>
      Gerrit-Reviewer: Vidhan Jain <vid...@google.com>
      Gerrit-Attention: Vidhan Jain <vid...@google.com>
      Gerrit-Comment-Date: Tue, 05 May 2026 11:39:42 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Vidhan Jain <vid...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages