// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifdef UNSAFE_BUFFERS_BUILD // TODO(crbug.com/40284755): Remove this and spanify to fix the errors. #pragma allow_unsafe_buffers #endif #include "base/memory/platform_shared_memory_mapper.h" #include "base/logging.h" #include "base/numerics/safe_conversions.h" #include <sys/mman.h> namespace base { std::optional<span<uint8_t>> PlatformSharedMemoryMapper::Map( subtle::PlatformSharedMemoryHandle handle, bool write_allowed, uint64_t offset, size_t size) { … } void PlatformSharedMemoryMapper::Unmap(span<uint8_t> mapping) { … } } // namespace base