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

Side by Side 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: Rebased, Fixed non-deterministic tests and Bryan's review comments. Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/page_load_metrics/browser/page_load_metrics_observer.h" 5 #include "components/page_load_metrics/browser/page_load_metrics_observer.h"
6 6
7 namespace page_load_metrics { 7 namespace page_load_metrics {
8 8
9 PageLoadExtraInfo::PageLoadExtraInfo(base::TimeDelta first_background_time, 9 PageLoadExtraInfo::PageLoadExtraInfo(
10 base::TimeDelta first_foreground_time, 10 const base::Optional<base::TimeDelta>& first_background_time,
11 bool started_in_foreground, 11 const base::Optional<base::TimeDelta>& first_foreground_time,
12 const GURL& committed_url, 12 bool started_in_foreground,
13 base::TimeDelta time_to_commit, 13 const GURL& committed_url,
14 UserAbortType abort_type, 14 const base::Optional<base::TimeDelta>& time_to_commit,
15 base::TimeDelta time_to_abort, 15 UserAbortType abort_type,
16 const PageLoadMetadata& metadata) 16 const base::Optional<base::TimeDelta>& time_to_abort,
17 const PageLoadMetadata& metadata)
17 : first_background_time(first_background_time), 18 : first_background_time(first_background_time),
18 first_foreground_time(first_foreground_time), 19 first_foreground_time(first_foreground_time),
19 started_in_foreground(started_in_foreground), 20 started_in_foreground(started_in_foreground),
20 committed_url(committed_url), 21 committed_url(committed_url),
21 time_to_commit(time_to_commit), 22 time_to_commit(time_to_commit),
22 abort_type(abort_type), 23 abort_type(abort_type),
23 time_to_abort(time_to_abort), 24 time_to_abort(time_to_abort),
24 metadata(metadata) {} 25 metadata(metadata) {}
25 26
26 PageLoadExtraInfo::PageLoadExtraInfo(const PageLoadExtraInfo& other) = default; 27 PageLoadExtraInfo::PageLoadExtraInfo(const PageLoadExtraInfo& other) = default;
27 28
29 // Using Optional <T> for the fields made clang complaint about not having
Charlie Harrison 2016/05/19 18:20:49 Suggestion: This comment isn't that useful. You ca
shivanisha 2016/05/23 15:06:43 removed
30 // an explicit out-of-line destructor
31 PageLoadExtraInfo::~PageLoadExtraInfo() {}
28 } // namespace page_load_metrics 32 } // namespace page_load_metrics
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698