Chromium Code Reviews| Index: components/page_load_metrics/common/page_load_timing.h |
| diff --git a/components/page_load_metrics/common/page_load_timing.h b/components/page_load_metrics/common/page_load_timing.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a14a2503b1aa91d70e038c18b5d5d14e872b5cc7 |
| --- /dev/null |
| +++ b/components/page_load_metrics/common/page_load_timing.h |
| @@ -0,0 +1,43 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ |
| +#define COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ |
| + |
| +#include "base/time/time.h" |
| + |
| +namespace page_load_metrics { |
| + |
| +// PageLoadTiming contains timing metrics associated with a page load. Many of |
| +// the metrics here are based on the Navigation Timing spec: |
| +// http://www.w3.org/TR/navigation-timing/. |
| +struct PageLoadTiming { |
| + public: |
| + PageLoadTiming(); |
| + ~PageLoadTiming(); |
| + |
| + bool operator==(const PageLoadTiming& other) const; |
|
Randy Smith (Not in Mondays)
2015/08/26 19:11:48
I have no objection, but document why this is need
|
| + |
| + // Time that the navigation for the associated page was initiated. |
| + base::Time navigation_start; |
| + |
| + // Time that the first byte of the response is received. |
| + base::Time response_start; |
| + |
| + // Time immediately before the DOMContentLoaded event is fired. |
| + base::Time dom_content_loaded_event_start; |
| + |
| + // Time immediately before the load event is fired. |
| + base::Time load_event_start; |
| + |
| + // Time when the first layout is completed. |
| + base::Time first_layout; |
|
Randy Smith (Not in Mondays)
2015/08/26 19:11:48
As I understand it (please correct me if I'm wrong
|
| + |
| + // If you add additional members, also be sure to update operator== and |
| + // page_load_metrics_messages.h |
| +}; |
| + |
| +} // namespace page_load_metrics |
| + |
| +#endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ |