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

Unified Diff: net/http/http_network_transaction.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/ftp/ftp_server_type_histograms.cc ('k') | net/socket_stream/socket_stream_metrics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
===================================================================
--- net/http/http_network_transaction.cc (revision 35277)
+++ net/http/http_network_transaction.cc (working copy)
@@ -1157,22 +1157,13 @@
100);
}
- static scoped_refptr<Histogram> tcp_socket_type_counter =
- LinearHistogram::LinearHistogramFactoryGet(
- "Net.TCPSocketType",
- 1, ClientSocketHandle::NUM_TYPES, ClientSocketHandle::NUM_TYPES + 1);
- tcp_socket_type_counter->SetFlags(kUmaTargetedHistogramFlag);
- tcp_socket_type_counter->Add(handle.reuse_type());
+ UMA_HISTOGRAM_ENUMERATION("Net.TCPSocketType", handle.reuse_type(),
+ ClientSocketHandle::NUM_TYPES);
if (use_late_binding_histogram) {
- static scoped_refptr<Histogram> tcp_socket_type_counter2 =
- LinearHistogram::LinearHistogramFactoryGet(
- FieldTrial::MakeName("Net.TCPSocketType",
- "SocketLateBinding").data(),
- 1, ClientSocketHandle::NUM_TYPES,
- ClientSocketHandle::NUM_TYPES + 1);
- tcp_socket_type_counter2->SetFlags(kUmaTargetedHistogramFlag);
- tcp_socket_type_counter2->Add(handle.reuse_type());
+ UMA_HISTOGRAM_ENUMERATION(
+ FieldTrial::MakeName("Net.TCPSocketType", "SocketLateBinding"),
+ handle.reuse_type(), ClientSocketHandle::NUM_TYPES);
}
UMA_HISTOGRAM_CLIPPED_TIMES(
@@ -1230,22 +1221,14 @@
static const bool use_late_binding_histogram =
!FieldTrial::MakeName("", "SocketLateBinding").empty();
- static scoped_refptr<Histogram> io_error_socket_type_counter =
- LinearHistogram::LinearHistogramFactoryGet(
- "Net.IOError_SocketReuseType",
- 1, ClientSocketHandle::NUM_TYPES, ClientSocketHandle::NUM_TYPES + 1);
- io_error_socket_type_counter->SetFlags(kUmaTargetedHistogramFlag);
- io_error_socket_type_counter->Add(handle.reuse_type());
+ UMA_HISTOGRAM_ENUMERATION("Net.IOError_SocketReuseType",
+ handle.reuse_type(), ClientSocketHandle::NUM_TYPES);
if (use_late_binding_histogram) {
- static scoped_refptr<Histogram> io_error_socket_type_counter =
- LinearHistogram::LinearHistogramFactoryGet(
- FieldTrial::MakeName("Net.IOError_SocketReuseType",
- "SocketLateBinding").data(),
- 1, ClientSocketHandle::NUM_TYPES,
- ClientSocketHandle::NUM_TYPES + 1);
- io_error_socket_type_counter->SetFlags(kUmaTargetedHistogramFlag);
- io_error_socket_type_counter->Add(handle.reuse_type());
+ UMA_HISTOGRAM_ENUMERATION(
+ FieldTrial::MakeName("Net.IOError_SocketReuseType",
+ "SocketLateBinding"),
+ handle.reuse_type(), ClientSocketHandle::NUM_TYPES);
}
switch (handle.reuse_type()) {
« no previous file with comments | « net/ftp/ftp_server_type_histograms.cc ('k') | net/socket_stream/socket_stream_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698