#include "services/device/geolocation/public_ip_address_location_notifier.h"
#include <memory>
#include "base/functional/bind.h"
#include "base/task/sequenced_task_runner.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "services/device/geolocation/wifi_data.h"
#include "services/device/public/cpp/geolocation/network_location_request_source.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
namespace device {
namespace {
constexpr base::TimeDelta kNetworkChangeReactionDelay = …;
}
PublicIpAddressLocationNotifier::PublicIpAddressLocationNotifier(
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
network::NetworkConnectionTracker* network_connection_tracker,
const std::string& api_key)
: … { … }
PublicIpAddressLocationNotifier::~PublicIpAddressLocationNotifier() { … }
void PublicIpAddressLocationNotifier::QueryNextPosition(
base::Time time_of_prev_position,
const net::PartialNetworkTrafficAnnotationTag& tag,
QueryNextPositionCallback callback) { … }
void PublicIpAddressLocationNotifier::OnConnectionChanged(
network::mojom::ConnectionType type) { … }
void PublicIpAddressLocationNotifier::ReactToNetworkChange() { … }
void PublicIpAddressLocationNotifier::MakeNetworkLocationRequest() { … }
void PublicIpAddressLocationNotifier::OnNetworkLocationResponse(
mojom::GeopositionResultPtr result,
const bool server_error,
const WifiData& ,
mojom::NetworkLocationResponsePtr ) { … }
}