#include "components/memory_pressure/multi_source_memory_pressure_monitor.h"
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/time/time.h"
#include "base/trace_event/base_tracing.h"
#include "base/tracing_buildflags.h"
#include "components/memory_pressure/system_memory_pressure_evaluator.h"
#if BUILDFLAG(ENABLE_BASE_TRACING)
#include "base/trace_event/memory_pressure_level_proto.h"
#endif
namespace memory_pressure {
MultiSourceMemoryPressureMonitor::MultiSourceMemoryPressureMonitor()
: … { … }
MultiSourceMemoryPressureMonitor::~MultiSourceMemoryPressureMonitor() { … }
void MultiSourceMemoryPressureMonitor::MaybeStartPlatformVoter() { … }
base::MemoryPressureListener::MemoryPressureLevel
MultiSourceMemoryPressureMonitor::GetCurrentPressureLevel() const { … }
std::unique_ptr<MemoryPressureVoter>
MultiSourceMemoryPressureMonitor::CreateVoter() { … }
void MultiSourceMemoryPressureMonitor::OnMemoryPressureLevelChanged(
base::MemoryPressureListener::MemoryPressureLevel level) { … }
void MultiSourceMemoryPressureMonitor::OnNotifyListenersRequested() { … }
void MultiSourceMemoryPressureMonitor::SetSystemEvaluator(
std::unique_ptr<SystemMemoryPressureEvaluator> evaluator) { … }
void MultiSourceMemoryPressureMonitor::SetDispatchCallbackForTesting(
const DispatchCallback& callback) { … }
}