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 COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_UTIL_H_ | 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UTIL_H_ |
6 #define COMPONENTS_PAGE_LOAD_METRICS_BROWSER_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" |
11 | 11 |
12 #define PAGE_LOAD_HISTOGRAM(name, sample) \ | 12 #define PAGE_LOAD_HISTOGRAM(name, sample) \ |
13 UMA_HISTOGRAM_CUSTOM_TIMES(name, sample, \ | 13 UMA_HISTOGRAM_CUSTOM_TIMES(name, sample, \ |
14 base::TimeDelta::FromMilliseconds(10), \ | 14 base::TimeDelta::FromMilliseconds(10), \ |
15 base::TimeDelta::FromMinutes(10), 100) | 15 base::TimeDelta::FromMinutes(10), 100) |
16 | 16 |
(...skipping 18 matching lines...) Expand all Loading... |
35 | 35 |
36 // Returns true if: | 36 // Returns true if: |
37 // - Parse started and did not complete but the entire page load duration | 37 // - Parse started and did not complete but the entire page load duration |
38 // happened in the foreground. | 38 // happened in the foreground. |
39 // - Parse completed and happened entirely in the foreground. | 39 // - Parse completed and happened entirely in the foreground. |
40 bool WasParseInForeground(const base::Optional<base::TimeDelta>& parse_start, | 40 bool WasParseInForeground(const base::Optional<base::TimeDelta>& parse_start, |
41 const base::Optional<base::TimeDelta>& parse_stop, | 41 const base::Optional<base::TimeDelta>& parse_stop, |
42 const PageLoadExtraInfo& info); | 42 const PageLoadExtraInfo& info); |
43 } // namespace page_load_metrics | 43 } // namespace page_load_metrics |
44 | 44 |
45 #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_UTIL_H_ | 45 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UTIL_H_ |
OLD | NEW |