chromium/components/performance_manager/graph/policies/bfcache_policy.cc

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

#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 {

// The foregrounded tab's cache limit on moderate memory pressure. The negative
// value means no limit.
int ForegroundCacheSizeOnModeratePressure() {}

// The backgrounded tab's cache limit on moderate memory pressure. The negative
// value means no limit.
int BackgroundCacheSizeOnModeratePressure() {}

// The foregrounded tab's cache limit on critical memory pressure. The negative
// value means no limit.
int ForegroundCacheSizeOnCriticalPressure() {}

// The backgrounded tab's cache limit on critical memory pressure. The negative
// value means no limit.
int BackgroundCacheSizeOnCriticalPressure() {}

bool PageMightHaveFramesInBFCache(const PageNode* page_node) {}

MemoryPressureLevel;

void MaybeFlushBFCacheOnUIThread(base::WeakPtr<content::WebContents> contents,
                                 MemoryPressureLevel memory_pressure_level) {}

}  // namespace

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) {}

}  // namespace performance_manager::policies