| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_DNS_MOJO_HOST_RESOLVER_IMPL_H_ | 5 #ifndef NET_DNS_MOJO_HOST_RESOLVER_IMPL_H_ |
| 6 #define NET_DNS_MOJO_HOST_RESOLVER_IMPL_H_ | 6 #define NET_DNS_MOJO_HOST_RESOLVER_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <set> | 9 #include <set> |
| 9 | 10 |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 #include "base/threading/thread_checker.h" | 12 #include "base/threading/thread_checker.h" |
| 12 #include "net/interfaces/host_resolver_service.mojom.h" | 13 #include "net/interfaces/host_resolver_service.mojom.h" |
| 13 #include "net/log/net_log_with_source.h" | 14 #include "net/log/net_log_with_source.h" |
| 14 | 15 |
| 15 namespace net { | 16 namespace net { |
| 16 | 17 |
| 17 class HostResolver; | 18 class HostResolver; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 40 void DeleteJob(Job* job); | 41 void DeleteJob(Job* job); |
| 41 | 42 |
| 42 // Resolver for resolving incoming requests. Not owned. | 43 // Resolver for resolving incoming requests. Not owned. |
| 43 net::HostResolver* resolver_; | 44 net::HostResolver* resolver_; |
| 44 | 45 |
| 45 // The NetLogWithSource to be passed to |resolver_| for all requests. | 46 // The NetLogWithSource to be passed to |resolver_| for all requests. |
| 46 const NetLogWithSource net_log_; | 47 const NetLogWithSource net_log_; |
| 47 | 48 |
| 48 // All pending jobs, so they can be cancelled when this service is destroyed. | 49 // All pending jobs, so they can be cancelled when this service is destroyed. |
| 49 // Owns all jobs. | 50 // Owns all jobs. |
| 50 std::set<Job*> pending_jobs_; | 51 std::set<std::unique_ptr<Job>> pending_jobs_; |
| 51 | 52 |
| 52 base::ThreadChecker thread_checker_; | 53 base::ThreadChecker thread_checker_; |
| 53 | 54 |
| 54 DISALLOW_COPY_AND_ASSIGN(MojoHostResolverImpl); | 55 DISALLOW_COPY_AND_ASSIGN(MojoHostResolverImpl); |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 } // namespace net | 58 } // namespace net |
| 58 | 59 |
| 59 #endif // NET_DNS_MOJO_HOST_RESOLVER_IMPL_H_ | 60 #endif // NET_DNS_MOJO_HOST_RESOLVER_IMPL_H_ |
| OLD | NEW |