0

Remove std::vector<const T>s in sandbox/

We can make the vector itself const and not lose any guarantees.

No behavior change.

Bug: 323708866
Change-Id: Icae5232e2ba6b9ff63d21e07a6767ae120c9a776
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5273483
Reviewed-by: Alex Gough <ajgo@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1257015}
This commit is contained in:
Nico Weber
2024-02-06 21:43:13 +00:00
committed by Chromium LUCI CQ
parent 3965be1c44
commit 0571795076
2 changed files with 2 additions and 2 deletions

@ -786,7 +786,7 @@ void PolicyBase::AddDelegateData(base::span<const uint8_t> data) {
// Can only set this once - as there is only one region sent to the child.
CHECK(!delegate_data_);
delegate_data_ =
std::make_unique<std::vector<const uint8_t>>(data.begin(), data.end());
std::make_unique<std::vector<uint8_t>>(data.begin(), data.end());
}
} // namespace sandbox

@ -238,7 +238,7 @@ class PolicyBase final : public TargetPolicy {
HANDLE stdout_handle_;
HANDLE stderr_handle_;
// An opaque blob of data the delegate uses to prime any pre-sandbox hooks.
std::unique_ptr<std::vector<const uint8_t>> delegate_data_;
std::unique_ptr<const std::vector<uint8_t>> delegate_data_;
std::unique_ptr<Dispatcher> dispatcher_;