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:danakj <danakj@chromium.org> Reviewed-by:
John Abd-El-Malek <jam@chromium.org> Reviewed-by:
Ayu Ishii <ayui@chromium.org> Reviewed-by:
Brianna Goldstein <brgoldstein@google.com> Cr-Commit-Position: refs/heads/main@{#1118897}
Loading
Please register or sign in to comment