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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 1211023003: Fix recording of "Time to error histograms". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 2b532814b739244026e1a384f8dc823cebcb4c7b..a1815a42a0f59bccab9682cc4e932caf9699fc21 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -856,39 +856,39 @@ void ResourceDispatcherHostImpl::DidFinishLoading(ResourceLoader* loader) {
// Record time to success and error for the most common errors, and for
// the aggregate remainder errors.
base::TimeDelta request_loading_time(
- base::Time::Now() - loader->request()->request_time());
+ base::TimeTicks::Now() - loader->request()->creation_time());
switch (loader->request()->status().error()) {
case net::OK:
UMA_HISTOGRAM_LONG_TIMES(
- "Net.RequestTime.Success", request_loading_time);
+ "Net.RequestTime2.Success", request_loading_time);
break;
case net::ERR_ABORTED:
UMA_HISTOGRAM_LONG_TIMES(
- "Net.RequestTime.ErrAborted", request_loading_time);
+ "Net.RequestTime2.ErrAborted", request_loading_time);
break;
case net::ERR_CONNECTION_RESET:
UMA_HISTOGRAM_LONG_TIMES(
- "Net.RequestTime.ErrConnectionReset", request_loading_time);
+ "Net.RequestTime2.ErrConnectionReset", request_loading_time);
break;
case net::ERR_CONNECTION_TIMED_OUT:
UMA_HISTOGRAM_LONG_TIMES(
- "Net.RequestTime.ErrConnectionTimedOut", request_loading_time);
+ "Net.RequestTime2.ErrConnectionTimedOut", request_loading_time);
break;
case net::ERR_INTERNET_DISCONNECTED:
UMA_HISTOGRAM_LONG_TIMES(
- "Net.RequestTime.ErrInternetDisconnected", request_loading_time);
+ "Net.RequestTime2.ErrInternetDisconnected", request_loading_time);
break;
case net::ERR_NAME_NOT_RESOLVED:
UMA_HISTOGRAM_LONG_TIMES(
- "Net.RequestTime.ErrNameNotResolved", request_loading_time);
+ "Net.RequestTime2.ErrNameNotResolved", request_loading_time);
break;
case net::ERR_TIMED_OUT:
UMA_HISTOGRAM_LONG_TIMES(
- "Net.RequestTime.ErrTimedOut", request_loading_time);
+ "Net.RequestTime2.ErrTimedOut", request_loading_time);
break;
default:
UMA_HISTOGRAM_LONG_TIMES(
- "Net.RequestTime.MiscError", request_loading_time);
+ "Net.RequestTime2.MiscError", request_loading_time);
break;
}
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698