diff --git sandbox/win/src/sandbox_policy.h sandbox/win/src/sandbox_policy.h index 57409176ff044..58bb027580bbb 100644 --- sandbox/win/src/sandbox_policy.h +++ sandbox/win/src/sandbox_policy.h @@ -275,7 +275,7 @@ class [[clang::lto_visibility_public]] TargetPolicy { // Adds a blob of data that will be made available in the child early in // startup via sandbox::GetDelegateData(). The contents of this data should // not vary between children with the same TargetConfig(). - virtual void AddDelegateData(base::span data) = 0; + virtual void AddDelegateData(base::span data) = 0; }; } // namespace sandbox diff --git sandbox/win/src/sandbox_policy_base.cc sandbox/win/src/sandbox_policy_base.cc index 1d5c93a0792b1..46600d1ae70cc 100644 --- sandbox/win/src/sandbox_policy_base.cc +++ sandbox/win/src/sandbox_policy_base.cc @@ -189,12 +189,12 @@ PolicyGlobal* ConfigBase::policy() { return policy_; } -std::optional> ConfigBase::policy_span() { +std::optional> ConfigBase::policy_span() { if (policy_) { // Note: this is not policy().data_size as that relates to internal data, // not the entire allocated policy area. - return base::span(reinterpret_cast(policy_.get()), - kPolMemSize); + return base::span(reinterpret_cast(policy_.get()), + kPolMemSize); } return std::nullopt; } @@ -756,19 +756,19 @@ bool PolicyBase::SetupHandleCloser(TargetProcess& target) { return handle_closer->InitializeTargetHandles(target); } -std::optional> PolicyBase::delegate_data_span() { +std::optional> PolicyBase::delegate_data_span() { if (delegate_data_) { return base::make_span(*delegate_data_); } return std::nullopt; } -void PolicyBase::AddDelegateData(base::span data) { +void PolicyBase::AddDelegateData(base::span data) { CHECK(data.size() > 0u); // Can only set this once - as there is only one region sent to the child. CHECK(!delegate_data_); delegate_data_ = - std::make_unique>(data.begin(), data.end()); + std::make_unique>(data.begin(), data.end()); } } // namespace sandbox diff --git sandbox/win/src/sandbox_policy_base.h sandbox/win/src/sandbox_policy_base.h index 090d51f701614..fb2aedd4aa0ec 100644 --- sandbox/win/src/sandbox_policy_base.h +++ sandbox/win/src/sandbox_policy_base.h @@ -116,7 +116,7 @@ class ConfigBase final : public TargetConfig { // Should only be called once the object is configured. PolicyGlobal* policy(); - std::optional> policy_span(); + std::optional> policy_span(); std::vector& blocklisted_dlls(); AppContainerBase* app_container(); IntegrityLevel integrity_level() { return integrity_level_; } @@ -176,7 +176,7 @@ class PolicyBase final : public TargetPolicy { ResultCode SetStdoutHandle(HANDLE handle) override; ResultCode SetStderrHandle(HANDLE handle) override; void AddHandleToShare(HANDLE handle) override; - void AddDelegateData(base::span data) override; + void AddDelegateData(base::span data) override; // Creates a Job object with the level specified in a previous call to // SetJobLevel(). @@ -238,13 +238,13 @@ class PolicyBase final : public TargetPolicy { // time. // Returns nullopt if no data has been set, or a view into the data. - std::optional> delegate_data_span(); + std::optional> delegate_data_span(); // The user-defined global policy settings. HANDLE stdout_handle_; HANDLE stderr_handle_; // An opaque blob of data the delegate uses to prime any pre-sandbox hooks. - std::unique_ptr> delegate_data_; + std::unique_ptr> delegate_data_; std::unique_ptr dispatcher_;