[AtMemory] Add ToPersonalContextEntity conversion utility [chromium/src : main]

0 views
Skip to first unread message

Karol Sygiet (Gerrit)

unread,
Jul 7, 2026, 5:17:40 AM (23 hours ago) Jul 7
to Andrew Vuong, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, browser-comp...@chromium.org
Attention needed from Andrew Vuong

Karol Sygiet added 1 comment

File components/autofill/core/browser/network/autofill_ai/personal_context_conversion_util.cc
Line 599, Patchset 6 (Latest): case MemoryDataType::kShipmentDeliveryAddress:
case MemoryDataType::kRedressNumberFull:
case MemoryDataType::kRedressNumberName:
case MemoryDataType::kRedressNumberNumber:
case MemoryDataType::kKnownTravelerNumberExpirationDate:
case MemoryDataType::kOrderGrandTotal:
Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Vuong
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: Ic0ab6948f02b886e65757068913c2fb90968a483
Gerrit-Change-Number: 8052645
Gerrit-PatchSet: 6
Gerrit-Owner: Karol Sygiet <syg...@google.com>
Gerrit-Reviewer: Karol Sygiet <syg...@google.com>
Gerrit-CC: Andrew Vuong <akv...@google.com>
Gerrit-Attention: Andrew Vuong <akv...@google.com>
Gerrit-Comment-Date: Tue, 07 Jul 2026 09:17:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Karol Sygiet (Gerrit)

unread,
Jul 7, 2026, 7:53:53 AM (21 hours ago) Jul 7
to (Julie)Jeongeun Kim, Gianmarco Picarella, Andrew Vuong, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, abigailbk...@google.com, dtseng...@chromium.org, nektar...@chromium.org, accessibility-a...@google.com, josiah...@chromium.org, kyungjunle...@google.com, francisjp...@google.com, yuzo+...@chromium.org, browser-comp...@chromium.org
Attention needed from Andrew Vuong

Karol Sygiet added 1 comment

File components/accessibility_annotator/core/annotation_reducer/memory_data_type_util.cc
Line 938, Patchset 9 (Latest): case MemoryDataType::kShipmentDeliveryAddress:

case MemoryDataType::kRedressNumberFull:
case MemoryDataType::kRedressNumberName:
case MemoryDataType::kRedressNumberNumber:
case MemoryDataType::kKnownTravelerNumberExpirationDate:
case MemoryDataType::kOrderGrandTotal:
Karol Sygiet . unresolved

Moving the comment here as the file location changed:

Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Vuong
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: Ic0ab6948f02b886e65757068913c2fb90968a483
Gerrit-Change-Number: 8052645
Gerrit-PatchSet: 9
Gerrit-Owner: Karol Sygiet <syg...@google.com>
Gerrit-Reviewer: Karol Sygiet <syg...@google.com>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Andrew Vuong <akv...@google.com>
Gerrit-CC: Gianmarco Picarella <pica...@google.com>
Gerrit-Comment-Date: Tue, 07 Jul 2026 11:53:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Karol Sygiet (Gerrit)

unread,
Jul 7, 2026, 7:54:00 AM (21 hours ago) Jul 7
to (Julie)Jeongeun Kim, Gianmarco Picarella, Andrew Vuong, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, abigailbk...@google.com, dtseng...@chromium.org, nektar...@chromium.org, accessibility-a...@google.com, josiah...@chromium.org, kyungjunle...@google.com, francisjp...@google.com, yuzo+...@chromium.org, browser-comp...@chromium.org
Attention needed from Andrew Vuong

Karol Sygiet added 1 comment

File components/autofill/core/browser/network/autofill_ai/personal_context_conversion_util.cc
Line 599, Patchset 6: case MemoryDataType::kShipmentDeliveryAddress:

case MemoryDataType::kRedressNumberFull:
case MemoryDataType::kRedressNumberName:
case MemoryDataType::kRedressNumberNumber:
case MemoryDataType::kKnownTravelerNumberExpirationDate:
case MemoryDataType::kOrderGrandTotal:
Karol Sygiet . resolved
Karol Sygiet

Acknowledged

Gerrit-Comment-Date: Tue, 07 Jul 2026 11:53:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Karol Sygiet <syg...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Karol Sygiet (Gerrit)

unread,
Jul 7, 2026, 7:56:36 AM (21 hours ago) Jul 7
to Jan Keitel, (Julie)Jeongeun Kim, Gianmarco Picarella, Andrew Vuong, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, abigailbk...@google.com, dtseng...@chromium.org, nektar...@chromium.org, accessibility-a...@google.com, josiah...@chromium.org, kyungjunle...@google.com, francisjp...@google.com, yuzo+...@chromium.org, browser-comp...@chromium.org
Attention needed from Andrew Vuong and Jan Keitel

Karol Sygiet added 1 comment

Patchset-level comments
File-level comment, Patchset 9 (Latest):
Karol Sygiet . resolved

Hi Jan, could you review this CL?

Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Vuong
  • Jan Keitel
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: Ic0ab6948f02b886e65757068913c2fb90968a483
Gerrit-Change-Number: 8052645
Gerrit-PatchSet: 9
Gerrit-Owner: Karol Sygiet <syg...@google.com>
Gerrit-Reviewer: Jan Keitel <jke...@google.com>
Gerrit-Reviewer: Karol Sygiet <syg...@google.com>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Andrew Vuong <akv...@google.com>
Gerrit-CC: Gianmarco Picarella <pica...@google.com>
Gerrit-Attention: Jan Keitel <jke...@google.com>
Gerrit-Attention: Andrew Vuong <akv...@google.com>
Gerrit-Comment-Date: Tue, 07 Jul 2026 11:56:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Jan Keitel (Gerrit)

unread,
Jul 7, 2026, 8:50:36 AM (20 hours ago) Jul 7
to Karol Sygiet, (Julie)Jeongeun Kim, Gianmarco Picarella, Andrew Vuong, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, abigailbk...@google.com, dtseng...@chromium.org, nektar...@chromium.org, accessibility-a...@google.com, josiah...@chromium.org, kyungjunle...@google.com, francisjp...@google.com, yuzo+...@chromium.org, browser-comp...@chromium.org
Attention needed from Andrew Vuong and Karol Sygiet

Jan Keitel added 5 comments

File components/accessibility_annotator/core/annotation_reducer/memory_data_type_util.h
Line 34, Patchset 9 (Latest): const std::u16string& value,
MemoryDataType memory_data_type,
const std::vector<EntryMetadata>& metadata_list);
Jan Keitel . unresolved

Please document what the parameters mean. In particular the `value` is obscure to me. I assume it's the value we would fill?

File components/accessibility_annotator/core/annotation_reducer/memory_data_type_util.cc
Line 100, Patchset 9 (Latest):std::optional<personal_context::proto::Date> ParseDate(std::string_view str) {
Jan Keitel . unresolved

Please document.

Also, for my understanding: What guarantees the format? Are all these strings optioned from the `SerializeData` function?

Line 719, Patchset 9 (Latest): const std::u16string& value,
MemoryDataType memory_data_type,
const std::vector<EntryMetadata>& metadata_list) {
Jan Keitel . unresolved

Nit: Prefer `std::u16string_view` and `base::span<const ...>`.

Line 740, Patchset 9 (Latest): *entity.mutable_passport()->mutable_issue_date() = *date;
Jan Keitel . unresolved

Here and elsewhere: `std::move`.

Line 879, Patchset 9 (Latest): for (std::string_view name : base::SplitStringPiece(
Jan Keitel . unresolved

Here and below: Can you help me understand what guarantees that the individual product names do not have "," contained in them?

Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Vuong
  • Karol Sygiet
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: Ic0ab6948f02b886e65757068913c2fb90968a483
Gerrit-Change-Number: 8052645
Gerrit-PatchSet: 9
Gerrit-Owner: Karol Sygiet <syg...@google.com>
Gerrit-Reviewer: Jan Keitel <jke...@google.com>
Gerrit-Reviewer: Karol Sygiet <syg...@google.com>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Andrew Vuong <akv...@google.com>
Gerrit-CC: Gianmarco Picarella <pica...@google.com>
Gerrit-Attention: Karol Sygiet <syg...@google.com>
Gerrit-Attention: Andrew Vuong <akv...@google.com>
Gerrit-Comment-Date: Tue, 07 Jul 2026 12:50:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Andrew Vuong (Gerrit)

unread,
Jul 7, 2026, 1:32:06 PM (15 hours ago) Jul 7
to Karol Sygiet, Jan Keitel, (Julie)Jeongeun Kim, Gianmarco Picarella, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, abigailbk...@google.com, dtseng...@chromium.org, nektar...@chromium.org, accessibility-a...@google.com, josiah...@chromium.org, kyungjunle...@google.com, francisjp...@google.com, yuzo+...@chromium.org, browser-comp...@chromium.org
Attention needed from Karol Sygiet

Andrew Vuong added 1 comment

File components/accessibility_annotator/core/annotation_reducer/memory_data_type_util.cc
Line 938, Patchset 9: case MemoryDataType::kShipmentDeliveryAddress:

case MemoryDataType::kRedressNumberFull:
case MemoryDataType::kRedressNumberName:
case MemoryDataType::kRedressNumberNumber:
case MemoryDataType::kKnownTravelerNumberExpirationDate:
case MemoryDataType::kOrderGrandTotal:
Karol Sygiet . unresolved

Moving the comment here as the file location changed:

Although they are AutofillAi types, the proto doesn't use them: https://source.chromium.org/chromium/chromium/src/+/main:components/personal_context/proto/features/common_data.proto;l=157;drc=458a490c2544e4ea08bb9457d8fe8f5c65af07c4

cc: @akv...@google.com

Andrew Vuong

More context: `MemoryDataType::kShipmentDeliveryAddress` -> Is being deprecated for now in favor of zip_code: b/523387151 for Autofill-usecase. It will still be populated, but the quality is not guaranteed (maybe fine for AtMem tbh but needs evals).

The other 5 are not supported as structured entities server-side. We may receive them as schemaless in the future (or schemaful is we would like to push for that).

Open in Gerrit

Related details

Attention is currently required from:
  • Karol Sygiet
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: Ic0ab6948f02b886e65757068913c2fb90968a483
Gerrit-Change-Number: 8052645
Gerrit-PatchSet: 10
Gerrit-Owner: Karol Sygiet <syg...@google.com>
Gerrit-Reviewer: Jan Keitel <jke...@google.com>
Gerrit-Reviewer: Karol Sygiet <syg...@google.com>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Andrew Vuong <akv...@google.com>
Gerrit-CC: Gianmarco Picarella <pica...@google.com>
Gerrit-Attention: Karol Sygiet <syg...@google.com>
Gerrit-Comment-Date: Tue, 07 Jul 2026 17:31:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Karol Sygiet <syg...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Karol Sygiet (Gerrit)

unread,
3:00 AM (1 hour ago) 3:00 AM
to Jan Keitel, (Julie)Jeongeun Kim, Gianmarco Picarella, Andrew Vuong, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, abigailbk...@google.com, dtseng...@chromium.org, nektar...@chromium.org, accessibility-a...@google.com, josiah...@chromium.org, kyungjunle...@google.com, francisjp...@google.com, yuzo+...@chromium.org, browser-comp...@chromium.org
Attention needed from Jan Keitel

Karol Sygiet added 5 comments

File components/accessibility_annotator/core/annotation_reducer/memory_data_type_util.h
Line 34, Patchset 9: const std::u16string& value,

MemoryDataType memory_data_type,
const std::vector<EntryMetadata>& metadata_list);
Jan Keitel . unresolved

Please document what the parameters mean. In particular the `value` is obscure to me. I assume it's the value we would fill?

Karol Sygiet

Does it look better now? I know that you've suggested differently in the past but IMO having the `AtMemoryPayload` as an argument here would make it easier to follow.

File components/accessibility_annotator/core/annotation_reducer/memory_data_type_util.cc
Line 100, Patchset 9:std::optional<personal_context::proto::Date> ParseDate(std::string_view str) {
Jan Keitel . unresolved

Please document.

Also, for my understanding: What guarantees the format? Are all these strings optioned from the `SerializeData` function?

Karol Sygiet

Added a comment.

yes it parses whatever `SerializeAttributeValue` and thus `SerializeData` serialized.

Line 719, Patchset 9: const std::u16string& value,

MemoryDataType memory_data_type,
const std::vector<EntryMetadata>& metadata_list) {
Jan Keitel . resolved

Nit: Prefer `std::u16string_view` and `base::span<const ...>`.

Karol Sygiet

Done

Line 740, Patchset 9: *entity.mutable_passport()->mutable_issue_date() = *date;
Jan Keitel . resolved

Here and elsewhere: `std::move`.

Karol Sygiet

Done

Line 879, Patchset 9: for (std::string_view name : base::SplitStringPiece(
Jan Keitel . unresolved

Here and below: Can you help me understand what guarantees that the individual product names do not have "," contained in them?

Karol Sygiet

There's no guarantee at the moment, but that's how they were serialized in the `SerializeAttributeValue`.

And yes the values can in theory have commas in them etc. But at the same time I'm not sure that splitting it too much will cause much trouble since the `Entity` will only be used to help PersonalContextService understand which SPII it should return to us.

Open in Gerrit

Related details

Attention is currently required from:
  • Jan Keitel
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: Ic0ab6948f02b886e65757068913c2fb90968a483
Gerrit-Change-Number: 8052645
Gerrit-PatchSet: 12
Gerrit-Owner: Karol Sygiet <syg...@google.com>
Gerrit-Reviewer: Jan Keitel <jke...@google.com>
Gerrit-Reviewer: Karol Sygiet <syg...@google.com>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Andrew Vuong <akv...@google.com>
Gerrit-CC: Gianmarco Picarella <pica...@google.com>
Gerrit-Attention: Jan Keitel <jke...@google.com>
Gerrit-Comment-Date: Wed, 08 Jul 2026 07:00:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Jan Keitel <jke...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Jan Keitel (Gerrit)

unread,
3:47 AM (1 hour ago) 3:47 AM
to Karol Sygiet, (Julie)Jeongeun Kim, Gianmarco Picarella, Andrew Vuong, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, abigailbk...@google.com, dtseng...@chromium.org, nektar...@chromium.org, accessibility-a...@google.com, josiah...@chromium.org, kyungjunle...@google.com, francisjp...@google.com, yuzo+...@chromium.org, browser-comp...@chromium.org
Attention needed from Karol Sygiet

Jan Keitel voted and added 3 comments

Votes added by Jan Keitel

Code-Review+1

3 comments

File components/accessibility_annotator/core/annotation_reducer/memory_data_type_util.h
Line 34, Patchset 9: const std::u16string& value,
MemoryDataType memory_data_type,
const std::vector<EntryMetadata>& metadata_list);
Jan Keitel . resolved

Please document what the parameters mean. In particular the `value` is obscure to me. I assume it's the value we would fill?

Karol Sygiet

Does it look better now? I know that you've suggested differently in the past but IMO having the `AtMemoryPayload` as an argument here would make it easier to follow.

Jan Keitel

Yes, I find this helpful - thank you!

File components/accessibility_annotator/core/annotation_reducer/memory_data_type_util.cc
Line 100, Patchset 9:std::optional<personal_context::proto::Date> ParseDate(std::string_view str) {
Jan Keitel . resolved

Please document.

Also, for my understanding: What guarantees the format? Are all these strings optioned from the `SerializeData` function?

Karol Sygiet

Added a comment.

yes it parses whatever `SerializeAttributeValue` and thus `SerializeData` serialized.

Jan Keitel

Acknowledged

Line 879, Patchset 9: for (std::string_view name : base::SplitStringPiece(
Jan Keitel . unresolved

Here and below: Can you help me understand what guarantees that the individual product names do not have "," contained in them?

Karol Sygiet

There's no guarantee at the moment, but that's how they were serialized in the `SerializeAttributeValue`.

And yes the values can in theory have commas in them etc. But at the same time I'm not sure that splitting it too much will cause much trouble since the `Entity` will only be used to help PersonalContextService understand which SPII it should return to us.

Jan Keitel

Okay, could you just leave a comment for now that explains why you are okay with the trade-off? Without knowing how the server system works, it's not clear to me whether this would cause problems or not.

Open in Gerrit

Related details

Attention is currently required from:
  • Karol Sygiet
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: Ic0ab6948f02b886e65757068913c2fb90968a483
Gerrit-Change-Number: 8052645
Gerrit-PatchSet: 12
Gerrit-Owner: Karol Sygiet <syg...@google.com>
Gerrit-Reviewer: Jan Keitel <jke...@google.com>
Gerrit-Reviewer: Karol Sygiet <syg...@google.com>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Andrew Vuong <akv...@google.com>
Gerrit-CC: Gianmarco Picarella <pica...@google.com>
Gerrit-Attention: Karol Sygiet <syg...@google.com>
Gerrit-Comment-Date: Wed, 08 Jul 2026 07:46:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Karol Sygiet <syg...@google.com>
Comment-In-Reply-To: Jan Keitel <jke...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Jan Keitel (Gerrit)

unread,
3:49 AM (1 hour ago) 3:49 AM
to Karol Sygiet, (Julie)Jeongeun Kim, Gianmarco Picarella, Andrew Vuong, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, abigailbk...@google.com, dtseng...@chromium.org, nektar...@chromium.org, accessibility-a...@google.com, josiah...@chromium.org, kyungjunle...@google.com, francisjp...@google.com, yuzo+...@chromium.org, browser-comp...@chromium.org
Attention needed from Karol Sygiet

Jan Keitel added 2 comments

File components/accessibility_annotator/core/annotation_reducer/BUILD.gn
Line 30, Patchset 12 (Latest): "//components/personal_context/proto:personal_context_proto",
Jan Keitel . unresolved

Please fix this WARNING reported by autoreview issue finding: Since `memory_data_type_util.h` includes `components/personal_context/proto/features/common_data.pb.h` and uses `personal_context::proto::Entity` in its public interface, `//components/personal_context/proto:personal_context_proto` should be added to `public_deps` instead of `deps`.

This prevents GN `check` errors for targets that depend on `annotation_reducer` and include `memory_data_type_util.h` (as they will need transitive access to the proto headers).

File components/accessibility_annotator/core/annotation_reducer/memory_data_type_util.cc
Line 729, Patchset 12 (Latest): const std::string& val) {
Jan Keitel . unresolved

Please fix this WARNING reported by autoreview issue finding: Optional optimization: Since protobuf 3 generates `std::string&&` overloads for string setters, you can take `val` by value (`std::string val`) and `std::move` it into the proto setters (e.g. `entity.mutable_passport()->set_number(std::move(val));`).

This would avoid copying the string out of the temporary created by `base::UTF16ToUTF8` at the call site.

Gerrit-Comment-Date: Wed, 08 Jul 2026 07:49:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Karol Sygiet (Gerrit)

unread,
4:12 AM (16 minutes ago) 4:12 AM
to Jan Keitel, (Julie)Jeongeun Kim, Gianmarco Picarella, Andrew Vuong, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, abigailbk...@google.com, dtseng...@chromium.org, nektar...@chromium.org, accessibility-a...@google.com, josiah...@chromium.org, kyungjunle...@google.com, francisjp...@google.com, yuzo+...@chromium.org, browser-comp...@chromium.org
Attention needed from Andrew Vuong and Jan Keitel

Karol Sygiet added 4 comments

File components/accessibility_annotator/core/annotation_reducer/BUILD.gn
Line 30, Patchset 12: "//components/personal_context/proto:personal_context_proto",
Jan Keitel . resolved

Please fix this WARNING reported by autoreview issue finding: Since `memory_data_type_util.h` includes `components/personal_context/proto/features/common_data.pb.h` and uses `personal_context::proto::Entity` in its public interface, `//components/personal_context/proto:personal_context_proto` should be added to `public_deps` instead of `deps`.

This prevents GN `check` errors for targets that depend on `annotation_reducer` and include `memory_data_type_util.h` (as they will need transitive access to the proto headers).

Karol Sygiet

Done

File components/accessibility_annotator/core/annotation_reducer/memory_data_type_util.cc
Line 729, Patchset 12: const std::string& val) {
Jan Keitel . resolved

Please fix this WARNING reported by autoreview issue finding: Optional optimization: Since protobuf 3 generates `std::string&&` overloads for string setters, you can take `val` by value (`std::string val`) and `std::move` it into the proto setters (e.g. `entity.mutable_passport()->set_number(std::move(val));`).

This would avoid copying the string out of the temporary created by `base::UTF16ToUTF8` at the call site.

Karol Sygiet

Done

Line 879, Patchset 9: for (std::string_view name : base::SplitStringPiece(
Jan Keitel . unresolved

Here and below: Can you help me understand what guarantees that the individual product names do not have "," contained in them?

Karol Sygiet

There's no guarantee at the moment, but that's how they were serialized in the `SerializeAttributeValue`.

And yes the values can in theory have commas in them etc. But at the same time I'm not sure that splitting it too much will cause much trouble since the `Entity` will only be used to help PersonalContextService understand which SPII it should return to us.

Jan Keitel

Okay, could you just leave a comment for now that explains why you are okay with the trade-off? Without knowing how the server system works, it's not clear to me whether this would cause problems or not.

Karol Sygiet

Added comments.

Line 938, Patchset 9: case MemoryDataType::kShipmentDeliveryAddress:
case MemoryDataType::kRedressNumberFull:
case MemoryDataType::kRedressNumberName:
case MemoryDataType::kRedressNumberNumber:
case MemoryDataType::kKnownTravelerNumberExpirationDate:
case MemoryDataType::kOrderGrandTotal:
Karol Sygiet . resolved

Moving the comment here as the file location changed:

Although they are AutofillAi types, the proto doesn't use them: https://source.chromium.org/chromium/chromium/src/+/main:components/personal_context/proto/features/common_data.proto;l=157;drc=458a490c2544e4ea08bb9457d8fe8f5c65af07c4

cc: @akv...@google.com

Andrew Vuong

More context: `MemoryDataType::kShipmentDeliveryAddress` -> Is being deprecated for now in favor of zip_code: b/523387151 for Autofill-usecase. It will still be populated, but the quality is not guaranteed (maybe fine for AtMem tbh but needs evals).

The other 5 are not supported as structured entities server-side. We may receive them as schemaless in the future (or schemaful is we would like to push for that).

Karol Sygiet

Acknowledged

Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Vuong
  • Jan Keitel
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: Ic0ab6948f02b886e65757068913c2fb90968a483
Gerrit-Change-Number: 8052645
Gerrit-PatchSet: 13
Gerrit-Owner: Karol Sygiet <syg...@google.com>
Gerrit-Reviewer: Jan Keitel <jke...@google.com>
Gerrit-Reviewer: Karol Sygiet <syg...@google.com>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Andrew Vuong <akv...@google.com>
Gerrit-CC: Gianmarco Picarella <pica...@google.com>
Gerrit-Attention: Jan Keitel <jke...@google.com>
Gerrit-Attention: Andrew Vuong <akv...@google.com>
Gerrit-Comment-Date: Wed, 08 Jul 2026 08:12:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Karol Sygiet <syg...@google.com>
Comment-In-Reply-To: Jan Keitel <jke...@google.com>
Comment-In-Reply-To: Andrew Vuong <akv...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages