| Index: chrome/common/page_load_metrics/page_load_timing.cc
|
| diff --git a/chrome/common/page_load_metrics/page_load_timing.cc b/chrome/common/page_load_metrics/page_load_timing.cc
|
| index 9ce7705baca0e990be0c45250ed031fdbc7374a6..f926f8d679a9856b830d528901c5801b5638b61a 100644
|
| --- a/chrome/common/page_load_metrics/page_load_timing.cc
|
| +++ b/chrome/common/page_load_metrics/page_load_timing.cc
|
| @@ -6,6 +6,69 @@
|
|
|
| namespace page_load_metrics {
|
|
|
| +DocumentTiming::DocumentTiming() {}
|
| +
|
| +DocumentTiming::DocumentTiming(const DocumentTiming& other) = default;
|
| +
|
| +DocumentTiming::~DocumentTiming() {}
|
| +
|
| +bool DocumentTiming::operator==(const DocumentTiming& other) const {
|
| + return dom_content_loaded_event_start ==
|
| + other.dom_content_loaded_event_start &&
|
| + load_event_start == other.load_event_start &&
|
| + first_layout == other.first_layout;
|
| +}
|
| +
|
| +bool DocumentTiming::IsEmpty() const {
|
| + return !dom_content_loaded_event_start && !load_event_start && !first_layout;
|
| +}
|
| +
|
| +PaintTiming::PaintTiming() {}
|
| +
|
| +PaintTiming::PaintTiming(const PaintTiming& other) = default;
|
| +
|
| +PaintTiming::~PaintTiming() {}
|
| +
|
| +bool PaintTiming::operator==(const PaintTiming& other) const {
|
| + return first_paint == other.first_paint &&
|
| + first_text_paint == other.first_text_paint &&
|
| + first_image_paint == other.first_image_paint &&
|
| + first_contentful_paint == other.first_contentful_paint &&
|
| + first_meaningful_paint == other.first_meaningful_paint;
|
| +}
|
| +
|
| +bool PaintTiming::IsEmpty() const {
|
| + return !first_paint && !first_text_paint && !first_image_paint &&
|
| + !first_contentful_paint && !first_meaningful_paint;
|
| +}
|
| +
|
| +ParseTiming::ParseTiming() {}
|
| +
|
| +ParseTiming::ParseTiming(const ParseTiming& other) = default;
|
| +
|
| +ParseTiming::~ParseTiming() {}
|
| +
|
| +bool ParseTiming::operator==(const ParseTiming& other) const {
|
| + return parse_start == other.parse_start && parse_stop == other.parse_stop &&
|
| + parse_blocked_on_script_load_duration ==
|
| + other.parse_blocked_on_script_load_duration &&
|
| + parse_blocked_on_script_load_from_document_write_duration ==
|
| + other.parse_blocked_on_script_load_from_document_write_duration &&
|
| + parse_blocked_on_script_execution_duration ==
|
| + other.parse_blocked_on_script_execution_duration &&
|
| + parse_blocked_on_script_execution_from_document_write_duration ==
|
| + other
|
| + .parse_blocked_on_script_execution_from_document_write_duration;
|
| +}
|
| +
|
| +bool ParseTiming::IsEmpty() const {
|
| + return !parse_start && !parse_stop &&
|
| + !parse_blocked_on_script_load_duration &&
|
| + !parse_blocked_on_script_load_from_document_write_duration &&
|
| + !parse_blocked_on_script_execution_duration &&
|
| + !parse_blocked_on_script_execution_from_document_write_duration;
|
| +}
|
| +
|
| StyleSheetTiming::StyleSheetTiming() {}
|
|
|
| StyleSheetTiming::StyleSheetTiming(const StyleSheetTiming& other) = default;
|
| @@ -33,39 +96,16 @@ PageLoadTiming::~PageLoadTiming() {}
|
| bool PageLoadTiming::operator==(const PageLoadTiming& other) const {
|
| return navigation_start == other.navigation_start &&
|
| response_start == other.response_start &&
|
| - dom_content_loaded_event_start ==
|
| - other.dom_content_loaded_event_start &&
|
| - load_event_start == other.load_event_start &&
|
| - first_layout == other.first_layout &&
|
| - first_paint == other.first_paint &&
|
| - first_text_paint == other.first_text_paint &&
|
| - first_image_paint == other.first_image_paint &&
|
| - first_contentful_paint == other.first_contentful_paint &&
|
| - first_meaningful_paint == other.first_meaningful_paint &&
|
| - parse_start == other.parse_start && parse_stop == other.parse_stop &&
|
| - parse_blocked_on_script_load_duration ==
|
| - other.parse_blocked_on_script_load_duration &&
|
| - parse_blocked_on_script_load_from_document_write_duration ==
|
| - other.parse_blocked_on_script_load_from_document_write_duration &&
|
| - parse_blocked_on_script_execution_duration ==
|
| - other.parse_blocked_on_script_execution_duration &&
|
| - parse_blocked_on_script_execution_from_document_write_duration ==
|
| - other
|
| - .parse_blocked_on_script_execution_from_document_write_duration &&
|
| + document_timing == other.document_timing &&
|
| + paint_timing == other.paint_timing &&
|
| + parse_timing == other.parse_timing &&
|
| style_sheet_timing == other.style_sheet_timing;
|
| }
|
|
|
| bool PageLoadTiming::IsEmpty() const {
|
| return navigation_start.is_null() && !response_start &&
|
| - !dom_content_loaded_event_start && !load_event_start &&
|
| - !first_layout && !first_paint && !first_text_paint &&
|
| - !first_image_paint && !first_contentful_paint &&
|
| - !first_meaningful_paint && !parse_start && !parse_stop &&
|
| - !parse_blocked_on_script_load_duration &&
|
| - !parse_blocked_on_script_load_from_document_write_duration &&
|
| - !parse_blocked_on_script_execution_duration &&
|
| - !parse_blocked_on_script_execution_from_document_write_duration &&
|
| - style_sheet_timing.IsEmpty();
|
| + document_timing.IsEmpty() && paint_timing.IsEmpty() &&
|
| + parse_timing.IsEmpty() && style_sheet_timing.IsEmpty();
|
| }
|
|
|
| PageLoadMetadata::PageLoadMetadata() {}
|
|
|