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

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

Issue 10873018: [net] Move DnsConfigService to NetworkChangeNotifier. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comment Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « net/dns/dns_config_watcher_win.cc ('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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 uint16 qtype; 182 uint16 qtype;
183 Result result; 183 Result result;
184 }; 184 };
185 185
186 typedef std::vector<MockDnsClientRule> MockDnsClientRuleList; 186 typedef std::vector<MockDnsClientRule> MockDnsClientRuleList;
187 187
188 // Creates mock DnsClient for testing HostResolverImpl. 188 // Creates mock DnsClient for testing HostResolverImpl.
189 scoped_ptr<DnsClient> CreateMockDnsClient(const DnsConfig& config, 189 scoped_ptr<DnsClient> CreateMockDnsClient(const DnsConfig& config,
190 const MockDnsClientRuleList& rules); 190 const MockDnsClientRuleList& rules);
191 191
192 class MockDnsConfigService : public DnsConfigService {
193 public:
194 virtual ~MockDnsConfigService();
195
196 // NetworkChangeNotifier::DNSObserver:
197 virtual void OnDNSChanged(unsigned detail) OVERRIDE;
198
199 // Expose the protected methods for tests.
200 void ChangeConfig(const DnsConfig& config);
201 void ChangeHosts(const DnsHosts& hosts);
202 };
203
204
205 } // namespace net 192 } // namespace net
206 193
207 #endif // NET_DNS_DNS_TEST_UTIL_H_ 194 #endif // NET_DNS_DNS_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « net/dns/dns_config_watcher_win.cc ('k') | net/dns/dns_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698