diff options
Diffstat (limited to 'net/ftp')
-rw-r--r-- | net/ftp/ftp_network_transaction.cc | 22 | ||||
-rw-r--r-- | net/ftp/ftp_server_type_histograms.cc | 22 |
2 files changed, 24 insertions, 20 deletions
diff --git a/net/ftp/ftp_network_transaction.cc b/net/ftp/ftp_network_transaction.cc index 1dfc99b..8014d07 100644 --- a/net/ftp/ftp_network_transaction.cc +++ b/net/ftp/ftp_network_transaction.cc @@ -1162,21 +1162,23 @@ void FtpNetworkTransaction::RecordDataConnectionError(int result) { break; }; static bool had_error_type[NUM_OF_NET_ERROR_TYPES]; - static LinearHistogram error_flagged("Net.FtpDataConnectionErrorHappened", - 1, NUM_OF_NET_ERROR_TYPES, - NUM_OF_NET_ERROR_TYPES + 1); - static LinearHistogram error_counter("Net.FtpDataConnectionErrorCount", - 1, NUM_OF_NET_ERROR_TYPES, - NUM_OF_NET_ERROR_TYPES + 1); + static scoped_refptr<Histogram> error_flagged = + LinearHistogram::LinearHistogramFactoryGet( + "Net.FtpDataConnectionErrorHappened", + 1, NUM_OF_NET_ERROR_TYPES, NUM_OF_NET_ERROR_TYPES + 1); + static scoped_refptr<Histogram> error_counter = + LinearHistogram::LinearHistogramFactoryGet( + "Net.FtpDataConnectionErrorCount", + 1, NUM_OF_NET_ERROR_TYPES, NUM_OF_NET_ERROR_TYPES + 1); DCHECK(type >= 0 && type < NUM_OF_NET_ERROR_TYPES); if (!had_error_type[type]) { had_error_type[type] = true; - error_flagged.SetFlags(kUmaTargetedHistogramFlag); - error_flagged.Add(type); + error_flagged->SetFlags(kUmaTargetedHistogramFlag); + error_flagged->Add(type); } - error_counter.SetFlags(kUmaTargetedHistogramFlag); - error_counter.Add(type); + error_counter->SetFlags(kUmaTargetedHistogramFlag); + error_counter->Add(type); } } // namespace net diff --git a/net/ftp/ftp_server_type_histograms.cc b/net/ftp/ftp_server_type_histograms.cc index 3f419a8..60ab9b9 100644 --- a/net/ftp/ftp_server_type_histograms.cc +++ b/net/ftp/ftp_server_type_histograms.cc @@ -22,22 +22,24 @@ namespace net { // expansion. void UpdateFtpServerTypeHistograms(FtpServerType type) { static bool had_server_type[NUM_OF_SERVER_TYPES]; - static LinearHistogram counter1("Net.HadFtpServerType", - 1, NUM_OF_SERVER_TYPES, - NUM_OF_SERVER_TYPES + 1); - static LinearHistogram counter2("Net.FtpServerTypeCount", - 1, NUM_OF_SERVER_TYPES, - NUM_OF_SERVER_TYPES + 1); + static scoped_refptr<Histogram> counter1 = + LinearHistogram::LinearHistogramFactoryGet("Net.HadFtpServerType", + 1, NUM_OF_SERVER_TYPES, + NUM_OF_SERVER_TYPES + 1); + static scoped_refptr<Histogram> counter2 = + LinearHistogram::LinearHistogramFactoryGet("Net.FtpServerTypeCount", + 1, NUM_OF_SERVER_TYPES, + NUM_OF_SERVER_TYPES + 1); if (type >= 0 && type < NUM_OF_SERVER_TYPES) { if (!had_server_type[type]) { had_server_type[type] = true; - counter1.SetFlags(kUmaTargetedHistogramFlag); - counter1.Add(type); + counter1->SetFlags(kUmaTargetedHistogramFlag); + counter1->Add(type); } } - counter2.SetFlags(kUmaTargetedHistogramFlag); - counter2.Add(type); + counter2->SetFlags(kUmaTargetedHistogramFlag); + counter2->Add(type); } } // namespace net |