1 // Copyright 2020 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef BASE_PROFILER_NATIVE_UNWINDER_ANDROID_MEMORY_REGIONS_MAP_H_
6 #define BASE_PROFILER_NATIVE_UNWINDER_ANDROID_MEMORY_REGIONS_MAP_H_
10 // NativeUnwinderAndroidMemoryRegionsMap is an opaque interface that hides
11 // concrete libunwindstack types, i.e. `unwindstack::Maps` and
12 // `unwindstack::Memory`. By introducing the interface, chrome code can
13 // pass the underlying instances around without referencing libunwindstack.
14 // NativeUnwinderAndroidMemoryRegionsMap's implementation must live in the
15 // stack_unwinder dynamic feature module.
17 // Code within the dynamic feature module is expected to downcast to the
18 // derived type to access the unwindstack types.
19 class NativeUnwinderAndroidMemoryRegionsMap {
21 NativeUnwinderAndroidMemoryRegionsMap() = default;
22 virtual ~NativeUnwinderAndroidMemoryRegionsMap() = default;
24 NativeUnwinderAndroidMemoryRegionsMap(
25 const NativeUnwinderAndroidMemoryRegionsMap&) = delete;
26 NativeUnwinderAndroidMemoryRegionsMap& operator=(
27 const NativeUnwinderAndroidMemoryRegionsMap&) = delete;
32 #endif // BASE_PROFILER_NATIVE_UNWINDER_ANDROID_MEMORY_REGIONS_MAP_H_