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

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

Issue 10377092: [net/dns] Isolate DnsConfigWatcher from DnsConfigService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added sanity DCHECK. Created 8 years, 7 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_test_util.h ('k') | net/net.gyp » ('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 #include "net/dns/dns_test_util.h" 5 #include "net/dns/dns_test_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 MockTransactionFactory factory_; 156 MockTransactionFactory factory_;
157 }; 157 };
158 158
159 } // namespace 159 } // namespace
160 160
161 // static 161 // static
162 scoped_ptr<DnsClient> CreateMockDnsClient(const DnsConfig& config) { 162 scoped_ptr<DnsClient> CreateMockDnsClient(const DnsConfig& config) {
163 return scoped_ptr<DnsClient>(new MockDnsClient(config)); 163 return scoped_ptr<DnsClient>(new MockDnsClient(config));
164 } 164 }
165 165
166 void MockDnsConfigService::Watch(const CallbackType& callback) { 166 MockDnsConfigService::~MockDnsConfigService() {
167 set_callback(callback); 167 }
168
169 void MockDnsConfigService::OnDNSChanged(unsigned detail) {
170 }
171
172 void MockDnsConfigService::ChangeConfig(const DnsConfig& config) {
173 DnsConfigService::OnConfigRead(config);
174 }
175
176 void MockDnsConfigService::ChangeHosts(const DnsHosts& hosts) {
177 DnsConfigService::OnHostsRead(hosts);
168 } 178 }
169 179
170 } // namespace net 180 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/dns_test_util.h ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698