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

Unified Diff: content/browser/renderer_host/async_resource_handler.cc

Issue 7602023: Use a monotonic clock (TimeTicks) to report network times to WebCore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync & Merge Created 9 years 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 | « chrome/renderer/security_filter_peer.cc ('k') | content/browser/renderer_host/resource_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/async_resource_handler.cc
diff --git a/content/browser/renderer_host/async_resource_handler.cc b/content/browser/renderer_host/async_resource_handler.cc
index 9f7577f81e8d445fba3f8ec2c2de932125fcc7c4..d4b5a159e8c19bda7dfc4f18d069050fc8c16aa5 100644
--- a/content/browser/renderer_host/async_resource_handler.cc
+++ b/content/browser/renderer_host/async_resource_handler.cc
@@ -26,7 +26,6 @@
#include "net/base/net_log.h"
#include "webkit/glue/resource_loader_bridge.h"
-using base::Time;
using base::TimeTicks;
namespace {
@@ -110,6 +109,8 @@ bool AsyncResourceHandler::OnRequestRedirected(
rdh_->delegate()->OnRequestRedirected(request, response, filter_);
DevToolsNetLogObserver::PopulateResponseInfo(request, response);
+ response->request_start = request->creation_time();
+ response->response_start = TimeTicks::Now();
return filter_->Send(new ResourceMsg_ReceivedRedirect(
routing_id_, request_id, new_url, *response));
}
@@ -143,6 +144,8 @@ bool AsyncResourceHandler::OnResponseStarted(
request_url))));
}
+ response->request_start = request->creation_time();
+ response->response_start = TimeTicks::Now();
filter_->Send(new ResourceMsg_ReceivedResponse(
routing_id_, request_id, *response));
@@ -241,7 +244,7 @@ bool AsyncResourceHandler::OnResponseCompleted(
int request_id,
const net::URLRequestStatus& status,
const std::string& security_info) {
- Time completion_time = Time::Now();
+ TimeTicks completion_time = TimeTicks::Now();
filter_->Send(new ResourceMsg_RequestComplete(routing_id_,
request_id,
status,
« no previous file with comments | « chrome/renderer/security_filter_peer.cc ('k') | content/browser/renderer_host/resource_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698