OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/mdns_client_impl.h" | 5 #include "net/dns/mdns_client_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <queue> | 8 #include <queue> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 delegate_->HandlePacket(response, bytes_read); | 202 delegate_->HandlePacket(response, bytes_read); |
203 } | 203 } |
204 | 204 |
205 MDnsClientImpl::Core::Core(base::Clock* clock, base::Timer* timer) | 205 MDnsClientImpl::Core::Core(base::Clock* clock, base::Timer* timer) |
206 : clock_(clock), | 206 : clock_(clock), |
207 cleanup_timer_(timer), | 207 cleanup_timer_(timer), |
208 connection_(new MDnsConnection(this)) { | 208 connection_(new MDnsConnection(this)) { |
209 } | 209 } |
210 | 210 |
211 MDnsClientImpl::Core::~Core() { | 211 MDnsClientImpl::Core::~Core() { |
212 STLDeleteValues(&listeners_); | 212 base::STLDeleteValues(&listeners_); |
213 } | 213 } |
214 | 214 |
215 bool MDnsClientImpl::Core::Init(MDnsSocketFactory* socket_factory) { | 215 bool MDnsClientImpl::Core::Init(MDnsSocketFactory* socket_factory) { |
216 return connection_->Init(socket_factory); | 216 return connection_->Init(socket_factory); |
217 } | 217 } |
218 | 218 |
219 bool MDnsClientImpl::Core::SendQuery(uint16_t rrtype, const std::string& name) { | 219 bool MDnsClientImpl::Core::SendQuery(uint16_t rrtype, const std::string& name) { |
220 std::string name_dns; | 220 std::string name_dns; |
221 if (!DNSDomainFromDot(name, &name_dns)) | 221 if (!DNSDomainFromDot(name, &name_dns)) |
222 return false; | 222 return false; |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 | 749 |
750 void MDnsTransactionImpl::OnNsecRecord(const std::string& name, unsigned type) { | 750 void MDnsTransactionImpl::OnNsecRecord(const std::string& name, unsigned type) { |
751 TriggerCallback(RESULT_NSEC, NULL); | 751 TriggerCallback(RESULT_NSEC, NULL); |
752 } | 752 } |
753 | 753 |
754 void MDnsTransactionImpl::OnCachePurged() { | 754 void MDnsTransactionImpl::OnCachePurged() { |
755 // TODO(noamsml): Cache purge situations not yet implemented | 755 // TODO(noamsml): Cache purge situations not yet implemented |
756 } | 756 } |
757 | 757 |
758 } // namespace net | 758 } // namespace net |
OLD | NEW |