#include "components/performance_manager/graph/policies/bfcache_policy.h"
#include "base/functional/bind.h"
#include "base/memory/memory_pressure_listener.h"
#include "base/memory/weak_ptr.h"
#include "base/notreached.h"
#include "base/task/task_traits.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "components/performance_manager/public/features.h"
#include "components/performance_manager/public/graph/frame_node.h"
#include "components/performance_manager/public/graph/page_node.h"
#include "content/public/browser/back_forward_cache.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
namespace performance_manager::policies {
namespace {
int ForegroundCacheSizeOnModeratePressure() { … }
int BackgroundCacheSizeOnModeratePressure() { … }
int ForegroundCacheSizeOnCriticalPressure() { … }
int BackgroundCacheSizeOnCriticalPressure() { … }
bool PageMightHaveFramesInBFCache(const PageNode* page_node) { … }
MemoryPressureLevel;
void MaybeFlushBFCacheOnUIThread(base::WeakPtr<content::WebContents> contents,
MemoryPressureLevel memory_pressure_level) { … }
}
void BFCachePolicy::MaybeFlushBFCache(
const PageNode* page_node,
MemoryPressureLevel memory_pressure_level) { … }
void BFCachePolicy::OnPassedToGraph(Graph* graph) { … }
void BFCachePolicy::OnTakenFromGraph(Graph* graph) { … }
void BFCachePolicy::OnMemoryPressure(MemoryPressureLevel new_level) { … }
}