OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_DNS_TEST_UTIL_H_ | 5 #ifndef NET_DNS_DNS_TEST_UTIL_H_ |
6 #define NET_DNS_DNS_TEST_UTIL_H_ | 6 #define NET_DNS_DNS_TEST_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 typedef std::vector<MockDnsClientRule> MockDnsClientRuleList; | 205 typedef std::vector<MockDnsClientRule> MockDnsClientRuleList; |
206 | 206 |
207 // MockDnsClient provides MockTransactionFactory. | 207 // MockDnsClient provides MockTransactionFactory. |
208 class MockDnsClient : public DnsClient { | 208 class MockDnsClient : public DnsClient { |
209 public: | 209 public: |
210 MockDnsClient(const DnsConfig& config, const MockDnsClientRuleList& rules); | 210 MockDnsClient(const DnsConfig& config, const MockDnsClientRuleList& rules); |
211 virtual ~MockDnsClient(); | 211 virtual ~MockDnsClient(); |
212 | 212 |
213 // DnsClient interface: | 213 // DnsClient interface: |
214 virtual void SetConfig(const DnsConfig& config) OVERRIDE; | 214 virtual void SetConfig(const DnsConfig& config) override; |
215 virtual const DnsConfig* GetConfig() const OVERRIDE; | 215 virtual const DnsConfig* GetConfig() const override; |
216 virtual DnsTransactionFactory* GetTransactionFactory() OVERRIDE; | 216 virtual DnsTransactionFactory* GetTransactionFactory() override; |
217 virtual AddressSorter* GetAddressSorter() OVERRIDE; | 217 virtual AddressSorter* GetAddressSorter() override; |
218 | 218 |
219 // Completes all DnsTransactions that were delayed by a rule. | 219 // Completes all DnsTransactions that were delayed by a rule. |
220 void CompleteDelayedTransactions(); | 220 void CompleteDelayedTransactions(); |
221 | 221 |
222 private: | 222 private: |
223 DnsConfig config_; | 223 DnsConfig config_; |
224 scoped_ptr<MockTransactionFactory> factory_; | 224 scoped_ptr<MockTransactionFactory> factory_; |
225 scoped_ptr<AddressSorter> address_sorter_; | 225 scoped_ptr<AddressSorter> address_sorter_; |
226 }; | 226 }; |
227 | 227 |
228 } // namespace net | 228 } // namespace net |
229 | 229 |
230 #endif // NET_DNS_DNS_TEST_UTIL_H_ | 230 #endif // NET_DNS_DNS_TEST_UTIL_H_ |
OLD | NEW |