OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ |
| 6 #define COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ |
| 7 |
| 8 #include "base/time/time.h" |
| 9 |
| 10 namespace page_load_metrics { |
| 11 |
| 12 // PageLoadTiming contains timing metrics associated with a page load. Many of |
| 13 // the metrics here are based on the Navigation Timing spec: |
| 14 // http://www.w3.org/TR/navigation-timing/. |
| 15 struct PageLoadTiming { |
| 16 public: |
| 17 PageLoadTiming(); |
| 18 ~PageLoadTiming(); |
| 19 |
| 20 bool operator==(const PageLoadTiming& other) const; |
| 21 |
| 22 bool IsEmpty() const; |
| 23 |
| 24 // Time that the navigation for the associated page was initiated. |
| 25 base::Time navigation_start; |
| 26 |
| 27 // All TimeDeltas are relative to navigation_start |
| 28 |
| 29 // Time that the first byte of the response is received. |
| 30 base::TimeDelta response_start; |
| 31 |
| 32 // Time immediately before the DOMContentLoaded event is fired. |
| 33 base::TimeDelta dom_content_loaded_event_start; |
| 34 |
| 35 // Time immediately before the load event is fired. |
| 36 base::TimeDelta load_event_start; |
| 37 |
| 38 // Time when the first layout is completed. |
| 39 base::TimeDelta first_layout; |
| 40 |
| 41 // If you add additional members, also be sure to update operator==, |
| 42 // page_load_metrics_messages.h, and IsEmpty(). |
| 43 }; |
| 44 |
| 45 } // namespace page_load_metrics |
| 46 |
| 47 #endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ |
OLD | NEW |