diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-03 21:39:26 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-03 21:39:26 +0000 |
commit | c20210e6a0c40bce1781a42abf81b44ba627f2a9 (patch) | |
tree | e658b8111109145bc450603ac69cb0de3dd47eb2 /chrome/common/render_messages.h | |
parent | 601b54022e6232875c8b24501e425b450f071217 (diff) | |
download | chromium_src-c20210e6a0c40bce1781a42abf81b44ba627f2a9.zip chromium_src-c20210e6a0c40bce1781a42abf81b44ba627f2a9.tar.gz chromium_src-c20210e6a0c40bce1781a42abf81b44ba627f2a9.tar.bz2 |
- Added support for keeping track of load times.
For each document loaded we record the time the page was requested by the user
(or as close as we can get to that), the time the load process started, the time
the
document and it's dependent resources (scripts) have been loaded (before
onload())
and the time all the document's resources have been loaded.
We use this data for two things:
1) We histogram the deltas between the time marks
2) We expose the times to javascript running on the page which was loaded
Review URL: http://codereview.chromium.org/42527
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13116 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages.h')
-rw-r--r-- | chrome/common/render_messages.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 38af203..1c983d0 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -42,6 +42,10 @@ #include "skia/include/SkBitmap.h" #endif +namespace base { +class Time; +} + struct ViewHostMsg_UpdateFeedList_Params { // The page_id for this navigation, or -1 if it is a new navigation. Back, // Forward, and Reload navigations should have a valid page_id. If the load @@ -78,6 +82,9 @@ struct ViewMsg_Navigate_Params { // Specifies if the URL should be loaded using 'reload' semantics (i.e., // bypassing any locally cached content). bool reload; + + // The time the request was created + base::Time request_time; }; // Parameters structure for ViewHostMsg_FrameNavigate, which has too many data @@ -662,6 +669,7 @@ struct ParamTraits<ViewMsg_Navigate_Params> { WriteParam(m, p.transition); WriteParam(m, p.state); WriteParam(m, p.reload); + WriteParam(m, p.request_time); } static bool Read(const Message* m, void** iter, param_type* p) { return @@ -670,7 +678,8 @@ struct ParamTraits<ViewMsg_Navigate_Params> { ReadParam(m, iter, &p->referrer) && ReadParam(m, iter, &p->transition) && ReadParam(m, iter, &p->state) && - ReadParam(m, iter, &p->reload); + ReadParam(m, iter, &p->reload) && + ReadParam(m, iter, &p->request_time); } static void Log(const param_type& p, std::wstring* l) { l->append(L"("); @@ -683,6 +692,8 @@ struct ParamTraits<ViewMsg_Navigate_Params> { LogParam(p.state, l); l->append(L", "); LogParam(p.reload, l); + l->append(L", "); + LogParam(p.request_time, l); l->append(L")"); } }; |