#include "services/network/proxy_auto_config_library.h"
#include <list>
#include <set>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_refptr.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote_set.h"
#include "net/base/address_list.h"
#include "net/base/ip_address.h"
#include "net/base/network_interfaces.h"
#include "net/dns/host_resolver_proc.h"
#include "net/dns/host_resolver_system_task.h"
#include "net/log/net_log_source.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/datagram_client_socket.h"
namespace network {
MyIpAddressImpl::MyIpAddressImpl(Mode mode) : … { … }
MyIpAddressImpl::~MyIpAddressImpl() = default;
void MyIpAddressImpl::AddRequest(
mojo::PendingRemote<proxy_resolver::mojom::HostResolverRequestClient>
my_ip_address_client) { … }
void MyIpAddressImpl::SetSocketFactoryForTest(
net::ClientSocketFactory* socket_factory) { … }
void MyIpAddressImpl::SetHostResolverProcForTest(
scoped_refptr<net::HostResolverProc> host_resolver_proc) { … }
void MyIpAddressImpl::DoLoop() { … }
int MyIpAddressImpl::DoConnectSocketsPublicInternetRoutes() { … }
int MyIpAddressImpl::DoTestResolvingHostname() { … }
int MyIpAddressImpl::DoConnectSocketsPrivateIPRoutes() { … }
int MyIpAddressImpl::DoSendResultsAndReset() { … }
void MyIpAddressImpl::Reset() { … }
void MyIpAddressImpl::ClientDisconnected(mojo::RemoteSetElementId ) { … }
struct MyIpAddressImpl::SocketConnectionResult { … };
int MyIpAddressImpl::DoConnectSockets(
std::vector<net::IPAddress> destination_ips) { … }
int MyIpAddressImpl::DoProcessConnectedSockets() { … }
void MyIpAddressImpl::OnConnectedSocket(SocketConnectionResult& socket_result,
int result) { … }
void MyIpAddressImpl::ReceiveDnsResults(
std::unique_ptr<net::HostResolverSystemTask> ,
const net::AddressList& addrlist,
int ,
int net_error) { … }
void MyIpAddressImpl::Add(const net::IPAddress& address) { … }
void MyIpAddressImpl::MarkAsDoneIfHaveCandidates() { … }
net::IPAddressList MyIpAddressImpl::GetResultForMyIpAddress() const { … }
net::IPAddressList MyIpAddressImpl::GetResultForMyIpAddressEx() const { … }
net::IPAddressList MyIpAddressImpl::GetSingleResultFavoringIPv4(
const net::IPAddressList& ips) { … }
}