Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(455)

Unified Diff: net/dns/host_resolver_impl.h

Issue 2389613002: Remove stl_util's deletion functions from net/dns/. (Closed)
Patch Set: rev Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..d5919e0b98aba98984f1a798d53206d86732b649 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,8 +263,8 @@ class NET_EXPORT HostResolverImpl
const HostCache::Entry& entry,
base::TimeDelta ttl);
- // Removes |job| from |jobs_|, only if it exists.
- void RemoveJob(Job* job);
+ // Removes |job| from |jobs_| and returns ownership.
+ std::unique_ptr<Job> RemoveJob(Job* job);
// Aborts all in progress jobs with ERR_NETWORK_CHANGED and notifies their
// requests. Might start new jobs.

Powered by Google App Engine
This is Rietveld 408576698