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

Unified Diff: chrome/browser/net/dns_host_info.cc

Issue 462027: Use factory to create histograms, and refcounts to track lifetimes... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/net/dns_host_info.cc
===================================================================
--- chrome/browser/net/dns_host_info.cc (revision 33932)
+++ chrome/browser/net/dns_host_info.cc (working copy)
@@ -104,10 +104,11 @@
}
// Make a custom linear histogram for the region from 0 to boundary.
const size_t kBucketCount = 52;
- static LinearHistogram histogram("DNS.QueueRecycledUnder2", TimeDelta(),
- kBoundary, kBucketCount);
- histogram.SetFlags(kUmaTargetedHistogramFlag);
- histogram.AddTime(queue_duration_);
+ static scoped_refptr<Histogram> histogram =
+ LinearHistogram::LinearHistogramFactoryGet("DNS.QueueRecycledUnder2",
+ TimeDelta(), kBoundary, kBucketCount);
+ histogram->SetFlags(kUmaTargetedHistogramFlag);
+ histogram->AddTime(queue_duration_);
}
void DnsHostInfo::SetPendingDeleteState() {
« no previous file with comments | « chrome/browser/jankometer.cc ('k') | chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698