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

Unified Diff: net/socket_stream/socket_stream_metrics.cc

Issue 515033: Cleanup histogram classes mixing SetFlags into FactoryGet arguments... (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
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | net/socket_stream/socket_stream_metrics_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket_stream/socket_stream_metrics.cc
===================================================================
--- net/socket_stream/socket_stream_metrics.cc (revision 35277)
+++ net/socket_stream/socket_stream_metrics.cc (working copy)
@@ -83,21 +83,13 @@
}
void SocketStreamMetrics::CountProtocolType(ProtocolType protocol_type) {
- static scoped_refptr<Histogram> counter =
- LinearHistogram::LinearHistogramFactoryGet(
- "Net.SocketStream.ProtocolType",
- 0, NUM_PROTOCOL_TYPES, NUM_PROTOCOL_TYPES + 1);
- counter->SetFlags(kUmaTargetedHistogramFlag);
- counter->Add(protocol_type);
+ UMA_HISTOGRAM_ENUMERATION("Net.SocketStream.ProtocolType",
+ protocol_type, NUM_PROTOCOL_TYPES);
}
void SocketStreamMetrics::CountConnectionType(ConnectionType connection_type) {
- static scoped_refptr<Histogram> counter =
- LinearHistogram::LinearHistogramFactoryGet(
- "Net.SocketStream.ConnectionType",
- 1, NUM_CONNECTION_TYPES, NUM_CONNECTION_TYPES + 1);
- counter->SetFlags(kUmaTargetedHistogramFlag);
- counter->Add(connection_type);
+ UMA_HISTOGRAM_ENUMERATION("Net.SocketStream.ConnectionType",
+ connection_type, NUM_CONNECTION_TYPES);
}
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | net/socket_stream/socket_stream_metrics_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698