Index: chrome/browser/net/chrome_network_delegate.cc |
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc |
index bed47f796f2a1f8d21426ade117ada47c08e8877..289cd33d57aa98d589cc472d29043b61fd07d8eb 100644 |
--- a/chrome/browser/net/chrome_network_delegate.cc |
+++ b/chrome/browser/net/chrome_network_delegate.cc |
@@ -468,6 +468,10 @@ int ChromeNetworkDelegate::OnHeadersReceived( |
void ChromeNetworkDelegate::OnBeforeRedirect(net::URLRequest* request, |
const GURL& new_location) { |
+// Recording data use of request on redirects. |
+#if !defined(OS_IOS) |
+ data_use_measurement_.ReportDataUseUMA(request); |
+#endif |
if (domain_reliability_monitor_) |
domain_reliability_monitor_->OnBeforeRedirect(request); |
extensions_delegate_->OnBeforeRedirect(request, new_location); |
@@ -491,6 +495,11 @@ void ChromeNetworkDelegate::OnNetworkBytesReceived( |
void ChromeNetworkDelegate::OnCompleted(net::URLRequest* request, |
bool started) { |
+#if !defined(OS_IOS) |
+ // TODO(amohammadkhan): Verify that there is no double recording in data use |
+ // of redirected requests. |
+ data_use_measurement_.ReportDataUseUMA(request); |
+#endif |
RecordNetworkErrorHistograms(request); |
if (started) { |
// Only call in for requests that were started, to obey the precondition |