Chromium Code Reviews| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "mojo/public/cpp/bindings/binding.h" | 9 #include "mojo/public/cpp/bindings/binding.h" |
| 10 #include "net/base/address_list.h" | 10 #include "net/base/address_list.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 } | 85 } |
| 86 | 86 |
| 87 int HostResolverMojo::ResolveFromCache(const RequestInfo& info, | 87 int HostResolverMojo::ResolveFromCache(const RequestInfo& info, |
| 88 AddressList* addresses, | 88 AddressList* addresses, |
| 89 const BoundNetLog& source_net_log) { | 89 const BoundNetLog& source_net_log) { |
| 90 DCHECK(thread_checker_.CalledOnValidThread()); | 90 DCHECK(thread_checker_.CalledOnValidThread()); |
| 91 DVLOG(1) << "ResolveFromCache " << info.host_port_pair().ToString(); | 91 DVLOG(1) << "ResolveFromCache " << info.host_port_pair().ToString(); |
| 92 return ResolveFromCacheInternal(info, CacheKeyForRequest(info), addresses); | 92 return ResolveFromCacheInternal(info, CacheKeyForRequest(info), addresses); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void HostResolverMojo::ChangeRequestPriority(RequestHandle req, | |
| 96 RequestPriority priority) { | |
| 97 // Do nothing, since Resolve() discarded the priority anyway. | |
|
Randy Smith (Not in Mondays)
2016/04/28 18:04:40
Oh, for goodness sake. What uses the DNS resolver
Julia Tuttle
2016/05/04 14:43:20
No idea!
mmenke
2016/05/04 17:33:16
The out of process PAC stuff, I would assume. I b
Randy Smith (Not in Mondays)
2016/05/05 00:07:25
Matt's probably right. Willing to put a TODO in t
Julia Tuttle
2016/05/05 12:47:56
I put a note in the .h instead, where I think a us
mmenke
2016/05/05 12:51:12
I think there's actually a bug filed against the p
| |
| 98 } | |
| 99 | |
| 95 void HostResolverMojo::CancelRequest(RequestHandle req) { | 100 void HostResolverMojo::CancelRequest(RequestHandle req) { |
| 96 DCHECK(thread_checker_.CalledOnValidThread()); | 101 DCHECK(thread_checker_.CalledOnValidThread()); |
| 97 // Deleting the Job closes the HostResolverRequestClient connection, | 102 // Deleting the Job closes the HostResolverRequestClient connection, |
| 98 // signalling cancellation of the request. | 103 // signalling cancellation of the request. |
| 99 delete static_cast<Job*>(req); | 104 delete static_cast<Job*>(req); |
| 100 } | 105 } |
| 101 | 106 |
| 102 HostCache* HostResolverMojo::GetHostCache() { | 107 HostCache* HostResolverMojo::GetHostCache() { |
| 103 return host_cache_.get(); | 108 return host_cache_.get(); |
| 104 } | 109 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 146 } | 151 } |
| 147 callback_.Run(error); | 152 callback_.Run(error); |
| 148 delete this; | 153 delete this; |
| 149 } | 154 } |
| 150 | 155 |
| 151 void HostResolverMojo::Job::OnConnectionError() { | 156 void HostResolverMojo::Job::OnConnectionError() { |
| 152 ReportResult(ERR_FAILED, interfaces::AddressListPtr()); | 157 ReportResult(ERR_FAILED, interfaces::AddressListPtr()); |
| 153 } | 158 } |
| 154 | 159 |
| 155 } // namespace net | 160 } // namespace net |
| OLD | NEW |