Skip to content
Commit d5244cf1 authored by Matt Menke's avatar Matt Menke Committed by Chromium LUCI CQ
Browse files

Make IsolationInfo and NetworkIsolationKey take nonces as optionals.

They were being taken as const pointers. This was due to overly strict
adherence to a line from the Google C++ style guide:

    Generally, use std::optional to represent optional by-value inputs,
    and use a const pointer when the non-optional form would have used
    a reference.

While this may make sense in the general case of a function that takes
a value and uses it directly, without more context, it doesn't make
sense in the case of a constructor that stores the input as an
absl::optional, particularly when every since production caller of that
constructor already has the value in an optional. Having all of those
callers have to convert an optional to a pointer, only to have the
constructor covert it back into an optional adds a lot of unnecessary
complexity, and doesn't accomplish anything useful.

BUG: None
Change-Id: I1a51cfab8df385df6fff8ae7dc064e2438740315
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4326990


Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: default avatardanakj <danakj@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarAyu Ishii <ayui@chromium.org>
Reviewed-by: default avatarBrianna Goldstein <brgoldstein@google.com>
Cr-Commit-Position: refs/heads/main@{#1118897}
parent e3b81d61
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment