| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_mojo.h" | 5 #include "net/dns/host_resolver_mojo.h" |
| 6 | 6 |
| 7 #include "mojo/public/cpp/bindings/binding.h" |
| 7 #include "net/base/address_list.h" | 8 #include "net/base/address_list.h" |
| 8 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
| 9 #include "net/dns/mojo_host_type_converters.h" | 10 #include "net/dns/mojo_host_type_converters.h" |
| 10 #include "net/log/net_log.h" | 11 #include "net/log/net_log.h" |
| 11 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" | |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 // Default TTL for successful host resolutions. | 16 // Default TTL for successful host resolutions. |
| 17 const int kCacheEntryTTLSeconds = 5; | 17 const int kCacheEntryTTLSeconds = 5; |
| 18 | 18 |
| 19 // Default TTL for unsuccessful host resolutions. | 19 // Default TTL for unsuccessful host resolutions. |
| 20 const int kNegativeCacheEntryTTLSeconds = 0; | 20 const int kNegativeCacheEntryTTLSeconds = 0; |
| 21 | 21 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 } | 144 } |
| 145 callback_.Run(error); | 145 callback_.Run(error); |
| 146 delete this; | 146 delete this; |
| 147 } | 147 } |
| 148 | 148 |
| 149 void HostResolverMojo::Job::OnConnectionError() { | 149 void HostResolverMojo::Job::OnConnectionError() { |
| 150 ReportResult(ERR_FAILED, interfaces::AddressListPtr()); | 150 ReportResult(ERR_FAILED, interfaces::AddressListPtr()); |
| 151 } | 151 } |
| 152 | 152 |
| 153 } // namespace net | 153 } // namespace net |
| OLD | NEW |