diff options
Diffstat (limited to 'net/socket_stream/socket_stream_metrics.cc')
| -rw-r--r-- | net/socket_stream/socket_stream_metrics.cc | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/net/socket_stream/socket_stream_metrics.cc b/net/socket_stream/socket_stream_metrics.cc index 6220eb5..625a491 100644 --- a/net/socket_stream/socket_stream_metrics.cc +++ b/net/socket_stream/socket_stream_metrics.cc @@ -83,21 +83,13 @@ void SocketStreamMetrics::OnClose() { } 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); } |
