OLD | NEW |
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 CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UTIL_H_ | 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UTIL_H_ |
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UTIL_H_ | 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UTIL_H_ |
7 | 7 |
8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
9 #include "base/optional.h" | 9 #include "base/optional.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 base::TimeTicks app_background_time); | 119 base::TimeTicks app_background_time); |
120 | 120 |
121 // Returns the minimum value of the optional TimeDeltas, if both values are | 121 // Returns the minimum value of the optional TimeDeltas, if both values are |
122 // set. Otherwise, if one value is set, returns that value. Otherwise, returns | 122 // set. Otherwise, if one value is set, returns that value. Otherwise, returns |
123 // an unset value. | 123 // an unset value. |
124 base::Optional<base::TimeDelta> OptionalMin( | 124 base::Optional<base::TimeDelta> OptionalMin( |
125 const base::Optional<base::TimeDelta>& a, | 125 const base::Optional<base::TimeDelta>& a, |
126 const base::Optional<base::TimeDelta>& b); | 126 const base::Optional<base::TimeDelta>& b); |
127 | 127 |
128 // Whether the given loading behavior was observed in any frame (either the main | 128 // Whether the given loading behavior was observed in any frame (either the main |
129 // frame or a child frame). | 129 // frame or a subframe). |
130 bool DidObserveLoadingBehaviorInAnyFrame( | 130 bool DidObserveLoadingBehaviorInAnyFrame( |
131 const page_load_metrics::PageLoadExtraInfo& info, | 131 const page_load_metrics::PageLoadExtraInfo& info, |
132 blink::WebLoadingBehaviorFlag behavior); | 132 blink::WebLoadingBehaviorFlag behavior); |
133 | 133 |
134 } // namespace page_load_metrics | 134 } // namespace page_load_metrics |
135 | 135 |
136 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UTIL_H_ | 136 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UTIL_H_ |
OLD | NEW |