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/stats_counters.h" | 10 #include "base/stats_counters.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 delete first_resolutions; | 180 delete first_resolutions; |
181 first_resolutions = NULL; | 181 first_resolutions = NULL; |
182 delete resolutions; | 182 delete resolutions; |
183 resolutions = NULL; | 183 resolutions = NULL; |
184 delete lock; | 184 delete lock; |
185 lock = NULL; | 185 lock = NULL; |
186 } | 186 } |
187 | 187 |
188 void PrefetchObserver::OnStartResolution(const std::string& host_name, | 188 void PrefetchObserver::OnStartResolution(const std::string& host_name, |
189 void* context) { | 189 void* context) { |
190 DCHECK_NE(0, host_name.length()); | 190 DCHECK_NE(0U, host_name.length()); |
191 DnsHostInfo navigation_info; | 191 DnsHostInfo navigation_info; |
192 navigation_info.SetHostname(host_name); | 192 navigation_info.SetHostname(host_name); |
193 navigation_info.SetStartedState(); | 193 navigation_info.SetStartedState(); |
194 | 194 |
195 NavigatingTo(host_name); | 195 NavigatingTo(host_name); |
196 | 196 |
197 AutoLock auto_lock(*lock); | 197 AutoLock auto_lock(*lock); |
198 (*resolutions)[context] = navigation_info; | 198 (*resolutions)[context] = navigation_info; |
199 } | 199 } |
200 | 200 |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 if (hostnames.size() > 0) | 461 if (hostnames.size() > 0) |
462 DnsPrefetchMotivatedList(hostnames, DnsHostInfo::STARTUP_LIST_MOTIVATED); | 462 DnsPrefetchMotivatedList(hostnames, DnsHostInfo::STARTUP_LIST_MOTIVATED); |
463 else // Start a thread. | 463 else // Start a thread. |
464 DnsMotivatedPrefetch(std::string("www.google.com"), | 464 DnsMotivatedPrefetch(std::string("www.google.com"), |
465 DnsHostInfo::STARTUP_LIST_MOTIVATED); | 465 DnsHostInfo::STARTUP_LIST_MOTIVATED); |
466 } | 466 } |
467 | 467 |
468 | 468 |
469 } // namespace chrome_browser_net | 469 } // namespace chrome_browser_net |
470 | 470 |
OLD | NEW |