chromium/base/memory/memory_pressure_listener.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/memory/memory_pressure_listener.h"

#include <atomic>

#include "base/observer_list.h"
#include "base/observer_list_threadsafe.h"
#include "base/task/sequenced_task_runner.h"
#include "base/trace_event/base_tracing.h"
#include "base/tracing_buildflags.h"

#if BUILDFLAG(ENABLE_BASE_TRACING)
#include "base/trace_event/memory_pressure_level_proto.h"  // no-presubmit-check
#endif

namespace base {

namespace {

// This class is thread safe and internally synchronized.
class MemoryPressureObserver {};

// Gets the shared MemoryPressureObserver singleton instance.
MemoryPressureObserver* GetMemoryPressureObserver() {}

std::atomic<bool> g_notifications_suppressed;

}  // namespace

MemoryPressureListener::MemoryPressureListener(
    const base::Location& creation_location,
    const MemoryPressureListener::MemoryPressureCallback& callback)
    :{}

MemoryPressureListener::MemoryPressureListener(
    const base::Location& creation_location,
    const MemoryPressureListener::MemoryPressureCallback& callback,
    const MemoryPressureListener::SyncMemoryPressureCallback&
        sync_memory_pressure_callback)
    :{}

MemoryPressureListener::~MemoryPressureListener() {}

void MemoryPressureListener::Notify(MemoryPressureLevel memory_pressure_level) {}

void MemoryPressureListener::SyncNotify(
    MemoryPressureLevel memory_pressure_level) {}

// static
void MemoryPressureListener::NotifyMemoryPressure(
    MemoryPressureLevel memory_pressure_level) {}

// static
bool MemoryPressureListener::AreNotificationsSuppressed() {}

// static
void MemoryPressureListener::SetNotificationsSuppressed(bool suppress) {}

// static
void MemoryPressureListener::SimulatePressureNotification(
    MemoryPressureLevel memory_pressure_level) {}

// static
void MemoryPressureListener::DoNotifyMemoryPressure(
    MemoryPressureLevel memory_pressure_level) {}

}  // namespace base