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 #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 Loading... |
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 |
OLD | NEW |