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

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

Issue 28046: Use string for Histogram names since these are all ASCII anyway wide-characte... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months 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 | Annotate | Revision Log
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_master.h" 5 #include "chrome/browser/net/dns_master.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 bool DnsMaster::AccruePrefetchBenefits(const GURL& referrer, 98 bool DnsMaster::AccruePrefetchBenefits(const GURL& referrer,
99 DnsHostInfo* navigation_info) { 99 DnsHostInfo* navigation_info) {
100 std::string hostname = navigation_info->hostname(); 100 std::string hostname = navigation_info->hostname();
101 101
102 AutoLock auto_lock(lock_); 102 AutoLock auto_lock(lock_);
103 Results::iterator it = results_.find(hostname); 103 Results::iterator it = results_.find(hostname);
104 if (it == results_.end()) { 104 if (it == results_.end()) {
105 // Remain under lock to assure static HISTOGRAM constructor is safely run. 105 // Remain under lock to assure static HISTOGRAM constructor is safely run.
106 // Use UMA histogram to quantify potential future gains here. 106 // Use UMA histogram to quantify potential future gains here.
107 UMA_HISTOGRAM_LONG_TIMES(L"DNS.UnexpectedResolutionL", 107 UMA_HISTOGRAM_LONG_TIMES("DNS.UnexpectedResolutionL",
108 navigation_info->resolve_duration()); 108 navigation_info->resolve_duration());
109 navigation_info->DLogResultsStats("DNS UnexpectedResolution"); 109 navigation_info->DLogResultsStats("DNS UnexpectedResolution");
110 110
111 NonlinkNavigation(referrer, navigation_info); 111 NonlinkNavigation(referrer, navigation_info);
112 return false; 112 return false;
113 } 113 }
114 DnsHostInfo& prefetched_host_info(it->second); 114 DnsHostInfo& prefetched_host_info(it->second);
115 115
116 // Sometimes a host is used as a subresource by several referrers, so it is 116 // Sometimes a host is used as a subresource by several referrers, so it is
117 // in our list, but was never motivated by a page-link-scan. In that case, it 117 // in our list, but was never motivated by a page-link-scan. In that case, it
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 Value* subresource_list; 492 Value* subresource_list;
493 if (!motivating_host->Get(1, &subresource_list)) 493 if (!motivating_host->Get(1, &subresource_list))
494 continue; 494 continue;
495 if (motivating_referrer.empty()) 495 if (motivating_referrer.empty())
496 continue; 496 continue;
497 referrers_[motivating_referrer].Deserialize(*subresource_list); 497 referrers_[motivating_referrer].Deserialize(*subresource_list);
498 } 498 }
499 } 499 }
500 500
501 } // namespace chrome_browser_net 501 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/net/dns_host_info.cc ('k') | chrome/browser/renderer_host/buffered_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698