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

Unified Diff: content/common/resource_dispatcher.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: Use strong typing Created 9 years, 1 month 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: content/common/resource_dispatcher.cc
diff --git a/content/common/resource_dispatcher.cc b/content/common/resource_dispatcher.cc
index 4afa078b6e7cf80c3774441ace9d7ec493c88cf5..4b818dae16c4aa401d8073282d7a8852fe22e023 100644
--- a/content/common/resource_dispatcher.cc
+++ b/content/common/resource_dispatcher.cc
@@ -332,7 +332,8 @@ void ResourceDispatcher::OnUploadProgress(
}
void ResourceDispatcher::OnReceivedResponse(
- int request_id, const ResourceResponseHead& response_head) {
+ int request_id, const ResourceResponseHead& response_head,
+ const base::TimeTicks& start_time, const base::TimeTicks& end_time) {
PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
if (!request_info)
return;
@@ -345,7 +346,7 @@ void ResourceDispatcher::OnReceivedResponse(
request_info->peer = new_peer;
}
- request_info->peer->OnReceivedResponse(response_head);
+ request_info->peer->OnReceivedResponse(response_head, start_time, end_time);
}
void ResourceDispatcher::OnReceivedCachedMetadata(
@@ -399,7 +400,9 @@ void ResourceDispatcher::OnReceivedRedirect(
const IPC::Message& message,
int request_id,
const GURL& new_url,
- const webkit_glue::ResourceResponseInfo& info) {
+ const webkit_glue::ResourceResponseInfo& info,
+ const base::TimeTicks& start_time,
+ const base::TimeTicks& end_time) {
PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
if (!request_info)
return;
@@ -408,8 +411,9 @@ void ResourceDispatcher::OnReceivedRedirect(
bool has_new_first_party_for_cookies = false;
GURL new_first_party_for_cookies;
if (request_info->peer->OnReceivedRedirect(new_url, info,
- &has_new_first_party_for_cookies,
- &new_first_party_for_cookies)) {
+ start_time, end_time,
+ &has_new_first_party_for_cookies,
+ &new_first_party_for_cookies)) {
// Double-check if the request is still around. The call above could
// potentially remove it.
request_info = GetPendingRequestInfo(request_id);
@@ -435,10 +439,11 @@ void ResourceDispatcher::FollowPendingRedirect(
message_sender()->Send(msg);
}
-void ResourceDispatcher::OnRequestComplete(int request_id,
- const net::URLRequestStatus& status,
- const std::string& security_info,
- const base::Time& completion_time) {
+void ResourceDispatcher::OnRequestComplete(
+ int request_id,
+ const net::URLRequestStatus& status,
+ const std::string& security_info,
+ const base::TimeTicks& completion_time) {
PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
if (!request_info)
return;

Powered by Google App Engine
This is Rietveld 408576698