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

Unified Diff: components/page_load_metrics/browser/page_load_metrics_observer.cc

Issue 1837233002: Optional <TimeDelta> since they may be non existent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Need to add Optional changes as well in this issue otherwise bots fail in compilation Created 4 years, 9 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: components/page_load_metrics/browser/page_load_metrics_observer.cc
diff --git a/components/page_load_metrics/browser/page_load_metrics_observer.cc b/components/page_load_metrics/browser/page_load_metrics_observer.cc
index 23a00fbaee3f6ce879bf04cf4539156b1f8207ab..8b87a1b025832d4d58ff83d778015992b0cb6024 100644
--- a/components/page_load_metrics/browser/page_load_metrics_observer.cc
+++ b/components/page_load_metrics/browser/page_load_metrics_observer.cc
@@ -7,13 +7,13 @@
namespace page_load_metrics {
PageLoadExtraInfo::PageLoadExtraInfo(
- base::TimeDelta first_background_time,
- base::TimeDelta first_foreground_time,
+ base::Optional<base::TimeDelta> first_background_time,
+ base::Optional<base::TimeDelta> first_foreground_time,
bool started_in_foreground,
const GURL& committed_url,
- base::TimeDelta time_to_commit,
+ base::Optional<base::TimeDelta> time_to_commit,
UserAbortType abort_type,
- base::TimeDelta time_to_abort)
+ base::Optional<base::TimeDelta> time_to_abort)
: first_background_time(first_background_time),
first_foreground_time(first_foreground_time),
started_in_foreground(started_in_foreground),
@@ -22,4 +22,7 @@ PageLoadExtraInfo::PageLoadExtraInfo(
abort_type(abort_type),
time_to_abort(time_to_abort) {}
+// Using Optional <T> for the fields made clang complaint about not having
+// an explicit out-of-line destructor
+PageLoadExtraInfo::~PageLoadExtraInfo() {}
} // namespace page_load_metrics

Powered by Google App Engine
This is Rietveld 408576698