| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/net/dns_global.h" | 5 #include "chrome/browser/net/dns_global.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 DCHECK_NE(0U, request_info.hostname().length()); | 198 DCHECK_NE(0U, request_info.hostname().length()); |
| 199 DnsHostInfo navigation_info; | 199 DnsHostInfo navigation_info; |
| 200 navigation_info.SetHostname(request_info.hostname()); | 200 navigation_info.SetHostname(request_info.hostname()); |
| 201 navigation_info.SetStartedState(); | 201 navigation_info.SetStartedState(); |
| 202 | 202 |
| 203 NavigatingTo(request_info.hostname()); | 203 NavigatingTo(request_info.hostname()); |
| 204 | 204 |
| 205 // TODO(eroman): If the resolve request is cancelled, then | 205 // TODO(eroman): If the resolve request is cancelled, then |
| 206 // OnFinishResolutionWithStatus will not be called, and |resolutions| will | 206 // OnFinishResolutionWithStatus will not be called, and |resolutions| will |
| 207 // grow unbounded! | 207 // grow unbounded! |
| 208 // http://crbug.com/14138 |
| 208 | 209 |
| 209 AutoLock auto_lock(*lock); | 210 AutoLock auto_lock(*lock); |
| 210 (*resolutions)[request_id] = navigation_info; | 211 (*resolutions)[request_id] = navigation_info; |
| 211 } | 212 } |
| 212 | 213 |
| 213 void PrefetchObserver::OnFinishResolutionWithStatus( | 214 void PrefetchObserver::OnFinishResolutionWithStatus( |
| 214 int request_id, | 215 int request_id, |
| 215 bool was_resolved, | 216 bool was_resolved, |
| 216 const net::HostResolver::RequestInfo& request_info) { | 217 const net::HostResolver::RequestInfo& request_info) { |
| 217 if (request_info.is_speculative()) | 218 if (request_info.is_speculative()) |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 dns_master->DeserializeReferrers(*referral_list); | 530 dns_master->DeserializeReferrers(*referral_list); |
| 530 } | 531 } |
| 531 | 532 |
| 532 void TrimSubresourceReferrers() { | 533 void TrimSubresourceReferrers() { |
| 533 if (NULL == dns_master) | 534 if (NULL == dns_master) |
| 534 return; | 535 return; |
| 535 dns_master->TrimReferrers(); | 536 dns_master->TrimReferrers(); |
| 536 } | 537 } |
| 537 | 538 |
| 538 } // namespace chrome_browser_net | 539 } // namespace chrome_browser_net |
| OLD | NEW |