Commit 02592186 authored by Miriam Gershenson's avatar Miriam Gershenson Committed by Commit Bot

net/dns/ documentation

Update comments on HostResolverImpl, ProcTask, and DnsTask.

Change-Id: I0f9a82b1cbb87e972835ae57d475eca08f30f76d
Reviewed-on: https://chromium-review.googlesource.com/975632Reviewed-by: default avatarBence Béky <bnc@chromium.org>
Commit-Queue: Miriam Gershenson <mgersh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545139}
parent ff97c503
......@@ -670,6 +670,9 @@ class HostResolverImpl::RequestImpl : public HostResolver::Request {
// Calls HostResolverProc in TaskScheduler. Performs retries if necessary.
//
// In non-test code, the HostResolverProc is always SystemHostResolverProc,
// which calls a platform API that implements host resolution.
//
// Whenever we try to resolve the host, we post a delayed task to check if host
// resolution (OnLookupComplete) is completed or not. If the original attempt
// hasn't completed, then we start another attempt for host resolution. We take
......@@ -966,7 +969,11 @@ class HostResolverImpl::ProcTask
//-----------------------------------------------------------------------------
// Resolves the hostname using DnsTransaction.
// Resolves the hostname using DnsTransaction, which is a full implementation of
// a DNS stub resolver. One DnsTransaction is created for each resolution
// needed, which for AF_UNSPEC resolutions includes both A and AAAA. The
// transactions are scheduled separately and started separately.
//
// TODO(szym): This could be moved to separate source file as well.
class HostResolverImpl::DnsTask : public base::SupportsWeakPtr<DnsTask> {
public:
......
......@@ -31,11 +31,11 @@ class NetLog;
class NetLogWithSource;
// For each hostname that is requested, HostResolver creates a
// HostResolverImpl::Job. When this job gets dispatched it creates a ProcTask
// which runs the given HostResolverProc in TaskScheduler. If requests for that
// same host are made during the job's lifetime, they are attached to the
// existing job rather than creating a new one. This avoids doing parallel
// resolves for the same host.
// HostResolverImpl::Job. When this job gets dispatched it creates a task
// (ProcTask for the system resolver or DnsTask for the async resolver) which
// resolves the hostname. If requests for that same host are made during the
// job's lifetime, they are attached to the existing job rather than creating a
// new one. This avoids doing parallel resolves for the same host.
//
// The way these classes fit together is illustrated by:
//
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment