1 // Copyright 2021 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. 4 5 // MemoryPressure provides static APIs for handling memory pressure on 6 // platforms that have such signals, such as Android and ChromeOS. 7 // The app will try to discard buffers that aren't deemed essential (individual 8 // modules will implement their own policy). 9 10 #ifndef BASE_TRACE_EVENT_MEMORY_PRESSURE_LEVEL_PROTO_H_ 11 #define BASE_TRACE_EVENT_MEMORY_PRESSURE_LEVEL_PROTO_H_ 12 13 #include "base/base_export.h" 14 #include "base/memory/memory_pressure_listener.h" 15 #include "base/tracing/protos/chrome_track_event.pbzero.h" 16 17 namespace base { 18 namespace trace_event { 19 20 BASE_EXPORT perfetto::protos::pbzero::MemoryPressureLevel 21 MemoryPressureLevelToTraceEnum( 22 MemoryPressureListener::MemoryPressureLevel memory_pressure_level); 23 24 } 25 } // namespace base 26 27 #endif // BASE_TRACE_EVENT_MEMORY_PRESSURE_LEVEL_PROTO_H_ 28