Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1210)

Unified Diff: chrome/common/page_load_metrics/page_load_timing.cc

Issue 2199443002: Move PageLoadTiming TimeDelta fields to a common header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove dom_loading Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 21c3204489a6074d4735cb44d5676af36e648587..e5b13f92e8f3268b0c397625a28bab67538bd4d1 100644
--- a/chrome/common/page_load_metrics/page_load_timing.cc
+++ b/chrome/common/page_load_metrics/page_load_timing.cc
@@ -13,31 +13,24 @@ PageLoadTiming::PageLoadTiming(const PageLoadTiming& other) = default;
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 &&
- 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;
+#define PAGE_LOAD_TIMING_TIME_DELTA_FIELD(field_name) \
+ &&field_name == other.field_name
+
+ return navigation_start == other.navigation_start
+#include "chrome/common/page_load_metrics/page_load_timing_fields.h"
+ ;
+
+#undef PAGE_LOAD_TIMING_TIME_DELTA_FIELD
}
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 && !parse_start &&
- !parse_stop && !parse_blocked_on_script_load_duration &&
- !parse_blocked_on_script_load_from_document_write_duration;
-}
+#define PAGE_LOAD_TIMING_TIME_DELTA_FIELD(field_name) &&!field_name
+
+ return navigation_start.is_null()
+#include "chrome/common/page_load_metrics/page_load_timing_fields.h"
+ ;
+
+#undef PAGE_LOAD_TIMING_TIME_DELTA_FIELD
PageLoadMetadata::PageLoadMetadata() {}
« no previous file with comments | « chrome/common/page_load_metrics/page_load_timing.h ('k') | chrome/common/page_load_metrics/page_load_timing_fields.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698