#ifndef COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_USER_TUNING_PREFS_H_
#define COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_USER_TUNING_PREFS_H_
#include <string>
#include <vector>
#include "base/time/time.h"
#include "base/timer/timer.h"
class PrefRegistrySimple;
class PrefService;
namespace user_prefs {
class PrefRegistrySyncable;
}
namespace performance_manager::user_tuning::prefs {
inline constexpr char kMemorySaverModeEnabled[] = …;
enum class MemorySaverModeState { … };
inline constexpr char kMemorySaverModeState[] = …;
inline constexpr char kMemorySaverModeTimeBeforeDiscardInMinutes[] = …;
constexpr int kDefaultMemorySaverModeTimeBeforeDiscardInMinutes = …;
enum class MemorySaverModeAggressiveness { … };
inline constexpr char kMemorySaverModeAggressiveness[] = …;
enum class BatterySaverModeState { … };
inline constexpr char kBatterySaverModeState[] = …;
inline constexpr char kLastBatteryUseTimestamp[] = …;
inline constexpr char kTabDiscardingExceptions[] = …;
inline constexpr char kTabDiscardingExceptionsWithTime[] = …;
inline constexpr char kManagedTabDiscardingExceptions[] = …;
inline constexpr char kDiscardRingTreatmentEnabled[] = …;
inline constexpr char kPerformanceInterventionNotificationEnabled[] = …;
void RegisterLocalStatePrefs(PrefRegistrySimple* registry);
void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
MemorySaverModeState GetCurrentMemorySaverModeState(PrefService* pref_service);
MemorySaverModeAggressiveness GetCurrentMemorySaverMode(
PrefService* pref_service);
base::TimeDelta GetCurrentMemorySaverModeTimeBeforeDiscard(
PrefService* pref_service);
BatterySaverModeState GetCurrentBatterySaverModeState(
PrefService* pref_service);
bool ShouldShowDiscardRingTreatment(PrefService* pref_service);
bool ShouldShowPerformanceInterventionNotification(PrefService* pref_service);
void MigrateMemorySaverModePref(PrefService* pref_service);
void MigrateMultiStateMemorySaverModePref(PrefService* pref_service);
void MigrateTabDiscardingExceptionsPref(PrefService* pref_service);
bool IsSiteInTabDiscardExceptionsList(PrefService* pref_service,
const std::string& site);
void AddSiteToTabDiscardExceptionsList(PrefService* pref_service,
const std::string& site);
std::vector<std::string> GetTabDiscardExceptionsBetween(
PrefService* pref_service,
base::Time period_start,
base::Time period_end);
void ClearTabDiscardExceptions(PrefService* pref_service,
base::Time delete_begin,
base::Time delete_end);
}
#endif