#include "components/network_hints/browser/simple_network_hints_handler_impl.h"
#include <memory>
#include <string>
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/storage_partition.h"
#include "ipc/ipc_message_macros.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "net/base/address_list.h"
#include "net/base/net_errors.h"
#include "net/dns/public/host_resolver_results.h"
#include "net/dns/public/resolve_error_info.h"
#include "net/log/net_log_with_source.h"
#include "services/network/public/cpp/resolve_host_client_base.h"
#include "services/network/public/mojom/host_resolver.mojom.h"
#include "services/network/public/mojom/network_context.mojom.h"
#include "url/gurl.h"
namespace network_hints {
namespace {
net::NetworkAnonymizationKey GetPendingNetworkAnonymizationKey(
content::RenderFrameHost* render_frame_host) { … }
class DnsLookupRequest : public network::ResolveHostClientBase { … };
}
SimpleNetworkHintsHandlerImpl::SimpleNetworkHintsHandlerImpl(
int render_process_id,
int render_frame_id)
: … { … }
SimpleNetworkHintsHandlerImpl::~SimpleNetworkHintsHandlerImpl() = default;
void SimpleNetworkHintsHandlerImpl::Create(
content::RenderFrameHost* frame_host,
mojo::PendingReceiver<mojom::NetworkHintsHandler> receiver) { … }
void SimpleNetworkHintsHandlerImpl::PrefetchDNS(
const std::vector<url::SchemeHostPort>& urls) { … }
void SimpleNetworkHintsHandlerImpl::Preconnect(const url::SchemeHostPort& url,
bool allow_credentials) { … }
}