OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BASE_MOCK_HOST_RESOLVER_H_ | 5 #ifndef NET_BASE_MOCK_HOST_RESOLVER_H_ |
6 #define NET_BASE_MOCK_HOST_RESOLVER_H_ | 6 #define NET_BASE_MOCK_HOST_RESOLVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 | 10 |
11 #include "base/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
12 #include "net/base/host_resolver_impl.h" | 12 #include "net/base/host_resolver_impl.h" |
13 #include "net/base/host_resolver_proc.h" | 13 #include "net/base/host_resolver_proc.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 | 16 |
17 class RuleBasedHostResolverProc; | 17 class RuleBasedHostResolverProc; |
18 | 18 |
19 // In most cases, it is important that unit tests avoid relying on making actual | 19 // In most cases, it is important that unit tests avoid relying on making actual |
20 // DNS queries since the resulting tests can be flaky, especially if the network | 20 // DNS queries since the resulting tests can be flaky, especially if the network |
21 // is unreliable for some reason. To simplify writing tests that avoid making | 21 // is unreliable for some reason. To simplify writing tests that avoid making |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 void Init(HostResolverProc* proc); | 190 void Init(HostResolverProc* proc); |
191 | 191 |
192 private: | 192 private: |
193 scoped_refptr<HostResolverProc> current_proc_; | 193 scoped_refptr<HostResolverProc> current_proc_; |
194 scoped_refptr<HostResolverProc> previous_proc_; | 194 scoped_refptr<HostResolverProc> previous_proc_; |
195 }; | 195 }; |
196 | 196 |
197 } // namespace net | 197 } // namespace net |
198 | 198 |
199 #endif // NET_BASE_MOCK_HOST_RESOLVER_H_ | 199 #endif // NET_BASE_MOCK_HOST_RESOLVER_H_ |
OLD | NEW |