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

Side by Side Diff: components/page_load_metrics/browser/page_load_metrics_observer.h

Issue 1817263003: Allow TimeTicks for serialized page load operations to be equal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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 #ifndef COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_OBSERVER_H_ 5 #ifndef COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_OBSERVER_H_
6 #define COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_OBSERVER_H_ 6 #define COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_OBSERVER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/page_load_metrics/common/page_load_timing.h" 9 #include "components/page_load_metrics/common/page_load_timing.h"
10 #include "content/public/browser/navigation_handle.h" 10 #include "content/public/browser/navigation_handle.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 // Add values before this final count. 49 // Add values before this final count.
50 ABORT_LAST_ENTRY 50 ABORT_LAST_ENTRY
51 }; 51 };
52 52
53 struct PageLoadExtraInfo { 53 struct PageLoadExtraInfo {
54 PageLoadExtraInfo(base::TimeDelta first_background_time, 54 PageLoadExtraInfo(base::TimeDelta first_background_time,
55 base::TimeDelta first_foreground_time, 55 base::TimeDelta first_foreground_time,
56 bool started_in_foreground, 56 bool started_in_foreground,
57 const GURL& committed_url, 57 const GURL& committed_url,
58 bool committed,
58 base::TimeDelta time_to_commit, 59 base::TimeDelta time_to_commit,
59 UserAbortType abort_type, 60 UserAbortType abort_type,
60 base::TimeDelta time_to_abort); 61 base::TimeDelta time_to_abort);
61 62
62 // The first time that the page was backgrounded since the navigation started. 63 // The first time that the page was backgrounded since the navigation started.
63 // If the page has not been backgrounded this will be base::TimeDelta(). 64 // If the page has not been backgrounded this will be base::TimeDelta().
64 const base::TimeDelta first_background_time; 65 const base::TimeDelta first_background_time;
65 66
66 // The first time that the page was foregrounded since the navigation started. 67 // The first time that the page was foregrounded since the navigation started.
67 // If the page has not been foregrounded this will be base::TimeDelta(). 68 // If the page has not been foregrounded this will be base::TimeDelta().
68 const base::TimeDelta first_foreground_time; 69 const base::TimeDelta first_foreground_time;
69 70
70 // True if the page load started in the foreground. 71 // True if the page load started in the foreground.
71 const bool started_in_foreground; 72 const bool started_in_foreground;
72 73
73 // Committed URL. If the page load did not commit, |committed_url| will be 74 // Committed URL. If the page load did not commit, |committed_url| will be
74 // empty. 75 // empty.
75 const GURL committed_url; 76 const GURL committed_url;
76 77
77 // Time from navigation start until commit. If the page load did not commit, 78 // Whether the navigation was committed.
78 // |time_to_commit| will be zero. 79 const bool committed;
Charlie Harrison 2016/03/22 14:10:13 Can you add: TODO(csharrison): Consider removing t
Will Harris 2016/03/22 18:13:17 Done.
80
81 // Time from navigation start until commit. Only valid if |committed| is true.
79 const base::TimeDelta time_to_commit; 82 const base::TimeDelta time_to_commit;
80 83
81 // The abort time and time to abort for this page load. If the page was not 84 // The abort time and time to abort for this page load. If the page was not
82 // aborted, |abort_type| will be |ABORT_NONE| and |time_to_abort| will be 85 // aborted, |abort_type| will be |ABORT_NONE| and |time_to_abort| will be
83 // |base::TimeDelta()|. 86 // |base::TimeDelta()|.
84 const UserAbortType abort_type; 87 const UserAbortType abort_type;
85 const base::TimeDelta time_to_abort; 88 const base::TimeDelta time_to_abort;
86 }; 89 };
87 90
88 // Interface for PageLoadMetrics observers. All instances of this class are 91 // Interface for PageLoadMetrics observers. All instances of this class are
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // data collected over the course of the page load. If the load did not 123 // data collected over the course of the page load. If the load did not
121 // receive any timing information, |timing.IsEmpty()| will be true. 124 // receive any timing information, |timing.IsEmpty()| will be true.
122 // After this call, the object will be deleted. 125 // After this call, the object will be deleted.
123 virtual void OnComplete(const PageLoadTiming& timing, 126 virtual void OnComplete(const PageLoadTiming& timing,
124 const PageLoadExtraInfo& extra_info) {} 127 const PageLoadExtraInfo& extra_info) {}
125 }; 128 };
126 129
127 } // namespace page_load_metrics 130 } // namespace page_load_metrics
128 131
129 #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_OBSERVER_H_ 132 #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698