Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Side by Side Diff: chrome/browser/net/dns_global.cc

Issue 14919: Platform cleanup in chrome/browser/net. (Closed)
Patch Set: Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/net/dns_master.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/dns_master.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698