Use span-based file API in audio_pipe_reader.cc [chromium/src : main]

0 views
Skip to first unread message

Jan Keitel (Gerrit)

unread,
Jan 9, 2026, 5:48:22 AM (12 days ago) Jan 9
to Yuwei Huang, Chromium LUCI CQ, AyeAye, chromotin...@chromium.org
Attention needed from Yuwei Huang

Jan Keitel voted Auto-Submit+1

Auto-Submit+1
Open in Gerrit

Related details

Attention is currently required from:
  • Yuwei Huang
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: I1729063df3fb86b0178d749b5aace04d16d2a8b1
Gerrit-Change-Number: 7419515
Gerrit-PatchSet: 2
Gerrit-Owner: Jan Keitel <jke...@google.com>
Gerrit-Reviewer: Jan Keitel <jke...@google.com>
Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
Gerrit-Attention: Yuwei Huang <yuw...@chromium.org>
Gerrit-Comment-Date: Fri, 09 Jan 2026 10:48:08 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Yuwei Huang (Gerrit)

unread,
Jan 12, 2026, 7:44:54 PM (8 days ago) Jan 12
to Jan Keitel, Chromium LUCI CQ, AyeAye, chromotin...@chromium.org
Attention needed from Jan Keitel

Yuwei Huang added 1 comment

File remoting/host/linux/audio_pipe_reader.cc
Line 164, Patchset 2 (Latest): if (read_bytes > 0) {
Yuwei Huang . unresolved

`read_bytes.value_or(0)`. `std::optional` does seem to have an [`operator>()`](https://en.cppreference.com/w/cpp/utility/optional.html), but it is cryptic, and I suspect it is not doing what you are expecting.

```suggestion
if (read_bytes.value_or(0) > 0) {
```
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: I1729063df3fb86b0178d749b5aace04d16d2a8b1
    Gerrit-Change-Number: 7419515
    Gerrit-PatchSet: 2
    Gerrit-Owner: Jan Keitel <jke...@google.com>
    Gerrit-Reviewer: Jan Keitel <jke...@google.com>
    Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
    Gerrit-Attention: Jan Keitel <jke...@google.com>
    Gerrit-Comment-Date: Tue, 13 Jan 2026 00:44:39 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Jan Keitel (Gerrit)

    unread,
    Jan 13, 2026, 2:05:11 AM (8 days ago) Jan 13
    to Yuwei Huang, Chromium LUCI CQ, AyeAye, chromotin...@chromium.org
    Attention needed from Yuwei Huang

    Jan Keitel voted and added 1 comment

    Votes added by Jan Keitel

    Auto-Submit+1

    1 comment

    File remoting/host/linux/audio_pipe_reader.cc
    Line 164, Patchset 2: if (read_bytes > 0) {
    Yuwei Huang . resolved

    `read_bytes.value_or(0)`. `std::optional` does seem to have an [`operator>()`](https://en.cppreference.com/w/cpp/utility/optional.html), but it is cryptic, and I suspect it is not doing what you are expecting.

    ```suggestion
    if (read_bytes.value_or(0) > 0) {
    ```
    Jan Keitel

    The previous code was intentional and did the right thing - `std::nullopt` always compares smaller than what can be contained. I've added the `value_or` part for explicitness, though.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Yuwei Huang
    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: I1729063df3fb86b0178d749b5aace04d16d2a8b1
      Gerrit-Change-Number: 7419515
      Gerrit-PatchSet: 3
      Gerrit-Owner: Jan Keitel <jke...@google.com>
      Gerrit-Reviewer: Jan Keitel <jke...@google.com>
      Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
      Gerrit-Attention: Yuwei Huang <yuw...@chromium.org>
      Gerrit-Comment-Date: Tue, 13 Jan 2026 07:04:59 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Yuwei Huang <yuw...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Yuwei Huang (Gerrit)

      unread,
      Jan 14, 2026, 4:08:53 PM (6 days ago) Jan 14
      to Jan Keitel, Chromium LUCI CQ, AyeAye, chromotin...@chromium.org
      Attention needed from Jan Keitel

      Yuwei Huang voted

      Code-Review+1
      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Jan Keitel
      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: I1729063df3fb86b0178d749b5aace04d16d2a8b1
      Gerrit-Change-Number: 7419515
      Gerrit-PatchSet: 3
      Gerrit-Owner: Jan Keitel <jke...@google.com>
      Gerrit-Reviewer: Jan Keitel <jke...@google.com>
      Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
      Gerrit-Attention: Jan Keitel <jke...@google.com>
      Gerrit-Comment-Date: Wed, 14 Jan 2026 21:08:36 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Jan 14, 2026, 5:00:13 PM (6 days ago) Jan 14
      to Jan Keitel, Yuwei Huang, AyeAye, chromotin...@chromium.org

      Chromium LUCI CQ submitted the change

      Change information

      Commit message:
      Use span-based file API in audio_pipe_reader.cc

      No functionality changes.
      Bug: 435317390
      Change-Id: I1729063df3fb86b0178d749b5aace04d16d2a8b1
      Reviewed-by: Yuwei Huang <yuw...@chromium.org>
      Auto-Submit: Jan Keitel <jke...@google.com>
      Commit-Queue: Yuwei Huang <yuw...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1569317}
      Files:
      • M remoting/host/linux/audio_pipe_reader.cc
      Change size: S
      Delta: 1 file changed, 7 insertions(+), 5 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Yuwei Huang
      Open in Gerrit
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: merged
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I1729063df3fb86b0178d749b5aace04d16d2a8b1
      Gerrit-Change-Number: 7419515
      Gerrit-PatchSet: 4
      Gerrit-Owner: Jan Keitel <jke...@google.com>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages