Chromium Code Reviews| 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 blink { | |
| 11 class WebPerformance; | |
| 12 } | |
| 13 | |
| 14 namespace page_load_metrics { | |
| 15 | |
| 16 // PageLoadTiming contains timing metrics associated with a page load. Many of | |
| 17 // the metrics here are based on the Navigation Timing spec: | |
| 18 // http://www.w3.org/TR/navigation-timing/. | |
| 19 struct PageLoadTiming { | |
| 20 public: | |
| 21 PageLoadTiming(); | |
| 22 PageLoadTiming(const blink::WebPerformance&); | |
|
Bryan McQuade
2015/09/09 16:26:26
should this be marked explicit? https://google-sty
Charlie Harrison
2015/09/09 17:32:03
Done.
| |
| 23 ~PageLoadTiming(); | |
| 24 | |
| 25 bool operator==(const PageLoadTiming& other) const; | |
| 26 | |
| 27 bool IsEmpty() const; | |
| 28 | |
| 29 // Time that the navigation for the associated page was initiated. | |
| 30 base::Time navigation_start; | |
| 31 | |
| 32 // All TimeDeltas are relative to navigation_start | |
| 33 | |
| 34 // Time that the first byte of the response is received. | |
| 35 base::TimeDelta response_start; | |
| 36 | |
| 37 // Time immediately before the DOMContentLoaded event is fired. | |
| 38 base::TimeDelta dom_content_loaded_event_start; | |
| 39 | |
| 40 // Time immediately before the load event is fired. | |
| 41 base::TimeDelta load_event_start; | |
| 42 | |
| 43 // Time when the first layout is completed. | |
| 44 base::TimeDelta first_layout; | |
| 45 | |
| 46 // If you add additional members, also be sure to update operator==, | |
| 47 // page_load_metrics_messages.h, and IsEmpty(). | |
| 48 }; | |
| 49 | |
| 50 } // namespace page_load_metrics | |
| 51 | |
| 52 #endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ | |
| OLD | NEW |