| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_PUBLIC_TEST_TEST_HOST_RESOLVER_H_ |
| 6 #define CONTENT_PUBLIC_TEST_TEST_HOST_RESOLVER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 |
| 11 namespace net { |
| 12 class HostResolverProc; |
| 13 class RuleBasedHostResolverProc; |
| 14 class ScopedDefaultHostResolverProc; |
| 15 } |
| 16 |
| 17 namespace content { |
| 18 class TestHostResolver { |
| 19 public: |
| 20 TestHostResolver(); |
| 21 ~TestHostResolver(); |
| 22 |
| 23 net::RuleBasedHostResolverProc* host_resolver() { |
| 24 return rule_based_resolver_.get(); |
| 25 } |
| 26 |
| 27 private: |
| 28 // Host resolver used during tests. |
| 29 scoped_refptr<net::HostResolverProc> local_resolver_; |
| 30 scoped_refptr<net::RuleBasedHostResolverProc> rule_based_resolver_; |
| 31 std::unique_ptr<net::ScopedDefaultHostResolverProc> |
| 32 scoped_local_host_resolver_proc_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(TestHostResolver); |
| 35 }; |
| 36 |
| 37 } // namespace content |
| 38 |
| 39 #endif // CONTENT_PUBLIC_TEST_TEST_HOST_RESOLVER_H_ |
| OLD | NEW |