| 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/host_resolver_impl.h" | 5 #include "net/dns/host_resolver_impl.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <Winsock2.h> | 8 #include <Winsock2.h> |
| 9 #elif defined(OS_POSIX) | 9 #elif defined(OS_POSIX) |
| 10 #include <netdb.h> | 10 #include <netdb.h> |
| (...skipping 2434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2445 job->ServeFromHosts(); | 2445 job->ServeFromHosts(); |
| 2446 } | 2446 } |
| 2447 } | 2447 } |
| 2448 | 2448 |
| 2449 void HostResolverImpl::OnIPAddressChanged() { | 2449 void HostResolverImpl::OnIPAddressChanged() { |
| 2450 resolved_known_ipv6_hostname_ = false; | 2450 resolved_known_ipv6_hostname_ = false; |
| 2451 last_ipv6_probe_time_ = base::TimeTicks(); | 2451 last_ipv6_probe_time_ = base::TimeTicks(); |
| 2452 // Abandon all ProbeJobs. | 2452 // Abandon all ProbeJobs. |
| 2453 probe_weak_ptr_factory_.InvalidateWeakPtrs(); | 2453 probe_weak_ptr_factory_.InvalidateWeakPtrs(); |
| 2454 if (cache_.get()) { | 2454 if (cache_.get()) { |
| 2455 cache_->clear(); | 2455 cache_->OnNetworkChange(); |
| 2456 cache_hit_callbacks_.clear(); | 2456 cache_hit_callbacks_.clear(); |
| 2457 } | 2457 } |
| 2458 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 2458 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| 2459 RunLoopbackProbeJob(); | 2459 RunLoopbackProbeJob(); |
| 2460 #endif | 2460 #endif |
| 2461 AbortAllInProgressJobs(); | 2461 AbortAllInProgressJobs(); |
| 2462 // |this| may be deleted inside AbortAllInProgressJobs(). | 2462 // |this| may be deleted inside AbortAllInProgressJobs(). |
| 2463 } | 2463 } |
| 2464 | 2464 |
| 2465 void HostResolverImpl::OnConnectionTypeChanged( | 2465 void HostResolverImpl::OnConnectionTypeChanged( |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2634 if (job_) | 2634 if (job_) |
| 2635 job_->CancelRequest(this); | 2635 job_->CancelRequest(this); |
| 2636 } | 2636 } |
| 2637 | 2637 |
| 2638 void HostResolverImpl::RequestImpl::ChangeRequestPriority( | 2638 void HostResolverImpl::RequestImpl::ChangeRequestPriority( |
| 2639 RequestPriority priority) { | 2639 RequestPriority priority) { |
| 2640 job_->ChangeRequestPriority(this, priority); | 2640 job_->ChangeRequestPriority(this, priority); |
| 2641 } | 2641 } |
| 2642 | 2642 |
| 2643 } // namespace net | 2643 } // namespace net |
| OLD | NEW |