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

Unified Diff: net/dns/mojo_host_resolver_impl.h

Issue 2489113002: Remove stl_util's deletion functions from MojoHostResolverImpl. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | net/dns/mojo_host_resolver_impl.cc » ('j') | net/dns/mojo_host_resolver_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/mojo_host_resolver_impl.h
diff --git a/net/dns/mojo_host_resolver_impl.h b/net/dns/mojo_host_resolver_impl.h
index 8c9eb48cc446f4bbed8e83b5aefc4b61ec790007..6a38c91378cfa35b7f24e064da0943ca8f93fff4 100644
--- a/net/dns/mojo_host_resolver_impl.h
+++ b/net/dns/mojo_host_resolver_impl.h
@@ -5,7 +5,7 @@
#ifndef NET_DNS_MOJO_HOST_RESOLVER_IMPL_H_
#define NET_DNS_MOJO_HOST_RESOLVER_IMPL_H_
-#include <set>
+#include <list>
mmenke 2016/11/11 16:18:03 While you're here, mind adding <memory>?
davidben 2016/12/08 21:12:02 Done.
#include "base/macros.h"
#include "base/threading/thread_checker.h"
@@ -36,8 +36,8 @@ class MojoHostResolverImpl {
private:
class Job;
- // Removes |job| from the set of pending jobs, and deletes it.
- void DeleteJob(Job* job);
+ // Removes |job| from the set of pending jobs.
+ void DeleteJob(std::list<Job>::iterator job);
// Resolver for resolving incoming requests. Not owned.
net::HostResolver* resolver_;
@@ -46,8 +46,7 @@ class MojoHostResolverImpl {
const NetLogWithSource net_log_;
// All pending jobs, so they can be cancelled when this service is destroyed.
- // Owns all jobs.
- std::set<Job*> pending_jobs_;
+ std::list<Job> pending_jobs_;
base::ThreadChecker thread_checker_;
« no previous file with comments | « no previous file | net/dns/mojo_host_resolver_impl.cc » ('j') | net/dns/mojo_host_resolver_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698