#include "components/download/internal/background_service/scheduler/device_status_listener.h"
#include "base/functional/bind.h"
#include "build/build_config.h"
namespace download {
namespace {
BatteryStatus ToBatteryStatus(bool on_battery_power) { … }
NetworkStatus ToNetworkStatus(network::mojom::ConnectionType type) { … }
}
DeviceStatusListener::DeviceStatusListener(
const base::TimeDelta& startup_delay,
const base::TimeDelta& online_delay,
std::unique_ptr<BatteryStatusListener> battery_listener,
std::unique_ptr<NetworkStatusListener> network_listener)
: … { … }
DeviceStatusListener::~DeviceStatusListener() { … }
const DeviceStatus& DeviceStatusListener::CurrentDeviceStatus() { … }
void DeviceStatusListener::SetObserver(
DeviceStatusListener::Observer* observer) { … }
void DeviceStatusListener::Start(const base::TimeDelta& start_delay) { … }
void DeviceStatusListener::StartAfterDelay() { … }
void DeviceStatusListener::Stop() { … }
void DeviceStatusListener::OnNetworkStatusReady(
network::mojom::ConnectionType type) { … }
void DeviceStatusListener::OnNetworkChanged(
network::mojom::ConnectionType type) { … }
void DeviceStatusListener::OnPowerStateChange(bool on_battery_power) { … }
void DeviceStatusListener::NotifyStatusChange() { … }
void DeviceStatusListener::NotifyNetworkChange() { … }
}