chromium/services/device/compute_pressure/virtual_cpu_probe_manager.cc

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

#include "services/device/compute_pressure/virtual_cpu_probe_manager.h"

#include <optional>

#include "base/functional/callback.h"
#include "base/location.h"
#include "base/memory/ptr_util.h"
#include "base/memory/weak_ptr.h"
#include "base/sequence_checker.h"
#include "base/task/sequenced_task_runner.h"
#include "components/system_cpu/cpu_probe.h"
#include "components/system_cpu/cpu_sample.h"

namespace device {

namespace {

// CpuProbe implementation that always reports a user-provided value.
class VirtualCpuProbe final : public system_cpu::CpuProbe {};

VirtualCpuProbe::VirtualCpuProbe() = default;

VirtualCpuProbe::~VirtualCpuProbe() {}

void VirtualCpuProbe::Update(SampleCallback callback) {}

base::WeakPtr<system_cpu::CpuProbe> VirtualCpuProbe::GetWeakPtr() {}

void VirtualCpuProbe::SetSample(system_cpu::CpuSample sample) {}

}  // namespace

// static
std::unique_ptr<VirtualCpuProbeManager> VirtualCpuProbeManager::Create(
    base::TimeDelta sampling_interval,
    base::RepeatingCallback<void(mojom::PressureState)> sampling_callback) {}

VirtualCpuProbeManager::VirtualCpuProbeManager(
    base::TimeDelta sampling_interval,
    base::RepeatingCallback<void(mojom::PressureState)> sampling_callback)
    :{}

VirtualCpuProbeManager::~VirtualCpuProbeManager() = default;

void VirtualCpuProbeManager::SetPressureState(
    mojom::PressureState desired_state) {}

}  // namespace device