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

Side by Side Diff: net/dns/dns_test_util.h

Issue 1898033006: DNS: Add stubs for persisting data across restarts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: *silently glares at editor, reuploads with proper spacing* Created 4 years, 4 months 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 unified diff | Download patch
« no previous file with comments | « net/dns/dns_socket_pool.h ('k') | net/dns/dns_test_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 class MockDnsClient : public DnsClient { 188 class MockDnsClient : public DnsClient {
189 public: 189 public:
190 MockDnsClient(const DnsConfig& config, const MockDnsClientRuleList& rules); 190 MockDnsClient(const DnsConfig& config, const MockDnsClientRuleList& rules);
191 ~MockDnsClient() override; 191 ~MockDnsClient() override;
192 192
193 // DnsClient interface: 193 // DnsClient interface:
194 void SetConfig(const DnsConfig& config) override; 194 void SetConfig(const DnsConfig& config) override;
195 const DnsConfig* GetConfig() const override; 195 const DnsConfig* GetConfig() const override;
196 DnsTransactionFactory* GetTransactionFactory() override; 196 DnsTransactionFactory* GetTransactionFactory() override;
197 AddressSorter* GetAddressSorter() override; 197 AddressSorter* GetAddressSorter() override;
198 void ApplyPersistentData(const base::Value& data) override;
199 std::unique_ptr<const base::Value> GetPersistentData() const override;
198 200
199 // Completes all DnsTransactions that were delayed by a rule. 201 // Completes all DnsTransactions that were delayed by a rule.
200 void CompleteDelayedTransactions(); 202 void CompleteDelayedTransactions();
201 203
202 private: 204 private:
203 DnsConfig config_; 205 DnsConfig config_;
204 std::unique_ptr<MockTransactionFactory> factory_; 206 std::unique_ptr<MockTransactionFactory> factory_;
205 std::unique_ptr<AddressSorter> address_sorter_; 207 std::unique_ptr<AddressSorter> address_sorter_;
206 }; 208 };
207 209
208 } // namespace net 210 } // namespace net
209 211
210 #endif // NET_DNS_DNS_TEST_UTIL_H_ 212 #endif // NET_DNS_DNS_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « net/dns/dns_socket_pool.h ('k') | net/dns/dns_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698