| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <utility> | 5 #include <utility> |
| 6 | 6 |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 12 #include "base/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
| 13 #include "chrome/browser/local_discovery/service_discovery_client_impl.h" | 13 #include "chrome/browser/local_discovery/service_discovery_client_impl.h" |
| 14 #include "net/dns/dns_protocol.h" | 14 #include "net/dns/dns_protocol.h" |
| 15 #include "net/dns/record_rdata.h" | 15 #include "net/dns/record_rdata.h" |
| 16 | 16 |
| 17 namespace local_discovery { | 17 namespace local_discovery { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 // TODO(noamsml): Make this configurable through the LocalDomainResolver | 20 // TODO(noamsml): Make this configurable through the LocalDomainResolver |
| 21 // interface. | 21 // interface. |
| 22 const int kLocalDomainSecondAddressTimeoutMs = 100; | 22 const int kLocalDomainSecondAddressTimeoutMs = 100; |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 } | 577 } |
| 578 | 578 |
| 579 void LocalDomainResolverImpl::SendResolvedAddresses() { | 579 void LocalDomainResolverImpl::SendResolvedAddresses() { |
| 580 transaction_a_.reset(); | 580 transaction_a_.reset(); |
| 581 transaction_aaaa_.reset(); | 581 transaction_aaaa_.reset(); |
| 582 timeout_callback_.Cancel(); | 582 timeout_callback_.Cancel(); |
| 583 callback_.Run(IsSuccess(), address_ipv4_, address_ipv6_); | 583 callback_.Run(IsSuccess(), address_ipv4_, address_ipv6_); |
| 584 } | 584 } |
| 585 | 585 |
| 586 } // namespace local_discovery | 586 } // namespace local_discovery |
| OLD | NEW |