Chromium Code Reviews| Index: net/dns/host_resolver_impl.h |
| diff --git a/net/dns/host_resolver_impl.h b/net/dns/host_resolver_impl.h |
| index 373f2297ea068c5619e631f98ea001289af6f8f8..0ad7146dfc97ec1a9cdca1647a2df1baf143b12e 100644 |
| --- a/net/dns/host_resolver_impl.h |
| +++ b/net/dns/host_resolver_impl.h |
| @@ -179,8 +179,8 @@ class NET_EXPORT HostResolverImpl |
| class LoopbackProbeJob; |
| class DnsTask; |
| class RequestImpl; |
| - typedef HostCache::Key Key; |
| - typedef std::map<Key, Job*> JobMap; |
| + using Key = HostCache::Key; |
| + using JobMap = std::map<Key, std::unique_ptr<Job>>; |
| // Number of consecutive failures of DnsTask (with successful fallback to |
| // ProcTask) before the DnsClient is disabled until the next DNS change. |
| @@ -263,7 +263,7 @@ class NET_EXPORT HostResolverImpl |
| const HostCache::Entry& entry, |
| base::TimeDelta ttl); |
| - // Removes |job| from |jobs_|, only if it exists. |
| + // Removes |job| from |jobs_|, only if it exists, but does not delete it. |
|
davidben
2016/11/09 22:22:03
Perhaps it'd be better for it to return std::uniqu
Avi (use Gerrit)
2016/11/09 23:09:22
Done.
Avi (use Gerrit)
2016/11/11 01:42:49
Oh, boy. But the job might not be in jobs_, becaus
|
| void RemoveJob(Job* job); |
| // Aborts all in progress jobs with ERR_NETWORK_CHANGED and notifies their |