chromium/chrome/browser/performance_manager/test_support/test_user_performance_tuning_manager_environment.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/test_support/test_user_performance_tuning_manager_environment.h"

#include "base/power_monitor/battery_state_sampler.h"
#include "base/run_loop.h"
#include "base/test/power_monitor_test_utils.h"
#include "chrome/browser/performance_manager/test_support/fake_child_process_tuning_delegate.h"
#include "chrome/browser/performance_manager/test_support/fake_frame_throttling_delegate.h"
#include "chrome/browser/performance_manager/test_support/fake_memory_saver_mode_delegate.h"
#include "chrome/browser/performance_manager/test_support/fake_power_monitor_source.h"
#include "components/prefs/pref_service.h"

#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/constants/ash_features.h"
#include "chromeos/dbus/power/fake_power_manager_client.h"
#include "chromeos/dbus/power/power_manager_client.h"
#endif

namespace performance_manager::user_tuning {

namespace {

class QuitRunLoopOnBSMChangeObserver
    : public BatterySaverModeManager::Observer {};

}  //  namespace

TestUserPerformanceTuningManagerEnvironment::
    TestUserPerformanceTuningManagerEnvironment() = default;

TestUserPerformanceTuningManagerEnvironment::
    ~TestUserPerformanceTuningManagerEnvironment() {}

void TestUserPerformanceTuningManagerEnvironment::SetUp(
    PrefService* local_state) {}

void TestUserPerformanceTuningManagerEnvironment::SetUp(
    PrefService* local_state,
    std::unique_ptr<base::SamplingEventSource> sampling_event_source,
    std::unique_ptr<base::BatteryLevelProvider> battery_level_provider) {}

void TestUserPerformanceTuningManagerEnvironment::TearDown() {}

// static
void TestUserPerformanceTuningManagerEnvironment::SetBatterySaverMode(
    PrefService* local_state,
    bool enabled) {}

base::test::TestSamplingEventSource*
TestUserPerformanceTuningManagerEnvironment::sampling_source() {}

base::test::TestBatteryLevelProvider*
TestUserPerformanceTuningManagerEnvironment::battery_level_provider() {}

base::BatteryStateSampler*
TestUserPerformanceTuningManagerEnvironment::battery_state_sampler() {}

FakePowerMonitorSource*
TestUserPerformanceTuningManagerEnvironment::power_monitor_source() {}

}  // namespace performance_manager::user_tuning