chromium/chrome/browser/performance_manager/policies/memory_saver_mode_policy.cc

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

#include "chrome/browser/performance_manager/policies/memory_saver_mode_policy.h"

#include "base/containers/contains.h"
#include "base/notreached.h"
#include "chrome/browser/performance_manager/policies/page_discarding_helper.h"
#include "components/performance_manager/public/decorators/tab_page_decorator.h"
#include "components/performance_manager/public/features.h"
#include "components/performance_manager/public/user_tuning/prefs.h"
#include "components/performance_manager/public/user_tuning/tab_revisit_tracker.h"

namespace performance_manager::policies {

namespace {
MemorySaverModePolicy* g_memory_saver_mode_policy =;
MemorySaverModeAggressiveness;
}  // namespace

MemorySaverModePolicy::MemorySaverModePolicy() {}

MemorySaverModePolicy::~MemorySaverModePolicy() {}

// static
MemorySaverModePolicy* MemorySaverModePolicy::GetInstance() {}

void MemorySaverModePolicy::OnIsVisibleChanged(const PageNode* page_node) {}

void MemorySaverModePolicy::OnTabAdded(
    TabPageDecorator::TabHandle* tab_handle) {}

void MemorySaverModePolicy::OnBeforeTabRemoved(
    TabPageDecorator::TabHandle* tab_handle) {}

void MemorySaverModePolicy::OnPassedToGraph(Graph* graph) {}

void MemorySaverModePolicy::OnTakenFromGraph(Graph* graph) {}

void MemorySaverModePolicy::OnMemorySaverModeChanged(bool enabled) {}

base::TimeDelta MemorySaverModePolicy::GetTimeBeforeDiscardForTesting() const {}

void MemorySaverModePolicy::SetMode(MemorySaverModeAggressiveness mode) {}

bool MemorySaverModePolicy::IsMemorySaverDiscardingEnabled() const {}

void MemorySaverModePolicy::StartAllDiscardTimers() {}

void MemorySaverModePolicy::StartDiscardTimerIfEnabled(
    const TabPageDecorator::TabHandle* tab_handle,
    base::TimeDelta time_before_discard) {}

void MemorySaverModePolicy::RemoveActiveTimer(
    const TabPageDecorator::TabHandle* tab_handle) {}

void MemorySaverModePolicy::DiscardPageTimerCallback(
    const TabPageDecorator::TabHandle* tab_handle,
    base::LiveTicks posted_at,
    base::TimeDelta requested_time_before_discard) {}

base::TimeDelta MemorySaverModePolicy::GetTimeBeforeDiscardForCurrentMode()
    const {}

int MemorySaverModePolicy::GetMaxNumRevisitsForCurrentMode() const {}

}  // namespace performance_manager::policies