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

0 views
Skip to first unread message

Daniel Cheng (Gerrit)

unread,
Jan 30, 2026, 1:49:26 AM (3 days ago) Jan 30
to Mikel Astiz, 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
Attention needed from Mikel Astiz

Daniel Cheng voted and added 2 comments

Votes added by Daniel Cheng

Code-Review+1
Owners-Override+1

2 comments

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

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.

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

WithData

Open in Gerrit

Related details

Attention is currently required from:
  • Mikel Astiz
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: I8e488b7b2810c572945eb8837f0a17ca42456503
Gerrit-Change-Number: 7532451
Gerrit-PatchSet: 1
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-Attention: Mikel Astiz <mas...@chromium.org>
Gerrit-Comment-Date: Fri, 30 Jan 2026 06:49:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages