[base] Rename Pickle::WithData() to emphasize copying [chromium/src : main]

0 views
Skip to first unread message

Mikel Astiz (Gerrit)

unread,
Jan 30, 2026, 4:27:01 AM (3 days ago) Jan 30
to Daniel Cheng, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, alexmo...@chromium.org, bnc+...@chromium.org, creis...@chromium.org, dcheng+c...@chromium.org, mac-r...@chromium.org, max+watc...@igalia.com, navigation...@chromium.org, net-r...@chromium.org, nickdiego+wa...@igalia.com, ozone-...@chromium.org

Mikel Astiz added 2 comments

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

TBH I'm kind of fine with the existing name too. In my mind, `Pickle::WithData()` and `PickleIterator:WithData()` are both pretty clear, since Pickle is owning and PickleIterator is non-owning.

So the exceptional case is already called out (Pickle::With*Unowned*Buffer).

But if you want, I'm not really against this, though I don't love the current name. Maybe `Pickle::WithCopyOf()` or something instead would be better (from my perspective).

Whether or not we choose to rename, I think it's probably also worth throwing a `LIFETIME_BOUND` attribute on `WithUnownedBuffer()` even in the short-term.

Mikel Astiz

Given the feedback above, I will abandon this rename. Thanks!

We should discuss `LIFETIME_BOUND` separately because honestly I don't know how it can be used with spans (which are copied by value).

Commit Message
Line 7, Patchset 1:[base] Rename Pickle::ForData() to emphasize copying
Daniel Cheng . resolved

WithData

Mikel Astiz

Done

Open in Gerrit

Related details

Attention set is empty
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: I8e488b7b2810c572945eb8837f0a17ca42456503
Gerrit-Change-Number: 7532451
Gerrit-PatchSet: 3
Gerrit-Owner: Mikel Astiz <mas...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Mikel Astiz <mas...@chromium.org>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-Comment-Date: Fri, 30 Jan 2026 09:26:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
satisfied_requirement
open
diffy

Mikel Astiz (Gerrit)

unread,
Jan 30, 2026, 4:27:23 AM (3 days ago) Jan 30
to Daniel Cheng, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury, alexmo...@chromium.org, bnc+...@chromium.org, creis...@chromium.org, dcheng+c...@chromium.org, mac-r...@chromium.org, max+watc...@igalia.com, navigation...@chromium.org, net-r...@chromium.org, nickdiego+wa...@igalia.com, ozone-...@chromium.org

Mikel Astiz abandoned this change

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: abandon
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages