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

Unified Diff: ios/chrome/browser/net/ios_chrome_network_delegate.cc

Issue 2262063002: Adjust callers and networking delegates in ios/ to modified APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@URLRequestRead
Patch Set: typo Created 4 years, 3 months 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
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

Powered by Google App Engine
This is Rietveld 408576698