Index: ios/chrome/browser/net/ios_chrome_network_delegate.cc |
diff --git a/ios/chrome/browser/net/ios_chrome_network_delegate.cc b/ios/chrome/browser/net/ios_chrome_network_delegate.cc |
index a26503b0031ab0c76d5ab02cc4d74158e8541c68..51183da9a31b89bac394a463fe042a01a22a9ca0 100644 |
--- a/ios/chrome/browser/net/ios_chrome_network_delegate.cc |
+++ b/ios/chrome/browser/net/ios_chrome_network_delegate.cc |
@@ -51,15 +51,15 @@ void ReportInvalidReferrerSend(const GURL& target_url, |
// Record network errors that HTTP requests complete with, including OK and |
// ABORTED. |
-void RecordNetworkErrorHistograms(const net::URLRequest* request) { |
+void RecordNetworkErrorHistograms(const net::URLRequest* request, |
+ int net_error) { |
if (request->url().SchemeIs("http")) { |
UMA_HISTOGRAM_SPARSE_SLOWLY("Net.HttpRequestCompletionErrorCodes", |
- std::abs(request->status().error())); |
+ std::abs(net_error)); |
if (request->load_flags() & net::LOAD_MAIN_FRAME_DEPRECATED) { |
UMA_HISTOGRAM_SPARSE_SLOWLY( |
- "Net.HttpRequestCompletionErrorCodes.MainFrame", |
- std::abs(request->status().error())); |
+ "Net.HttpRequestCompletionErrorCodes.MainFrame", std::abs(net_error)); |
} |
} |
} |
@@ -109,8 +109,9 @@ int IOSChromeNetworkDelegate::OnBeforeURLRequest( |
} |
void IOSChromeNetworkDelegate::OnCompleted(net::URLRequest* request, |
- bool started) { |
- RecordNetworkErrorHistograms(request); |
+ bool started, |
+ int net_error) { |
+ RecordNetworkErrorHistograms(request, net_error); |
} |
net::NetworkDelegate::AuthRequiredResponse |