| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_TRACKER_H_ | 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ |
| 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ | 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 namespace internal { | 36 namespace internal { |
| 37 | 37 |
| 38 extern const char kErrorEvents[]; | 38 extern const char kErrorEvents[]; |
| 39 extern const char kAbortChainSizeReload[]; | 39 extern const char kAbortChainSizeReload[]; |
| 40 extern const char kAbortChainSizeForwardBack[]; | 40 extern const char kAbortChainSizeForwardBack[]; |
| 41 extern const char kAbortChainSizeNewNavigation[]; | 41 extern const char kAbortChainSizeNewNavigation[]; |
| 42 extern const char kAbortChainSizeNoCommit[]; | 42 extern const char kAbortChainSizeNoCommit[]; |
| 43 extern const char kAbortChainSizeSameURL[]; | 43 extern const char kAbortChainSizeSameURL[]; |
| 44 extern const char kPageLoadCompletedAfterAppBackground[]; | 44 extern const char kPageLoadCompletedAfterAppBackground[]; |
| 45 extern const char kPageLoadTimingStatus[]; |
| 46 |
| 47 // Used to track the status of PageLoadTimings received from the render process. |
| 48 // |
| 49 // If you add elements to this enum, make sure you update the enum value in |
| 50 // histograms.xml. Only add elements to the end to prevent inconsistencies |
| 51 // between versions. |
| 52 enum PageLoadTimingStatus { |
| 53 // The PageLoadTiming is valid (all data within the PageLoadTiming is |
| 54 // consistent with expectations). |
| 55 VALID, |
| 56 |
| 57 // All remaining status codes are for invalid PageLoadTimings. |
| 58 |
| 59 // The PageLoadTiming was empty. |
| 60 INVALID_EMPTY_TIMING, |
| 61 |
| 62 // The PageLoadTiming had a null navigation_start. |
| 63 INVALID_NULL_NAVIGATION_START, |
| 64 |
| 65 // Script load or execution durations in the PageLoadTiming were too long. |
| 66 INVALID_SCRIPT_LOAD_LONGER_THAN_PARSE, |
| 67 INVALID_SCRIPT_EXEC_LONGER_THAN_PARSE, |
| 68 INVALID_SCRIPT_LOAD_DOC_WRITE_LONGER_THAN_SCRIPT_LOAD, |
| 69 INVALID_SCRIPT_EXEC_DOC_WRITE_LONGER_THAN_SCRIPT_EXEC, |
| 70 |
| 71 // The order of two events in the PageLoadTiming was invalid. Either the first |
| 72 // wasn't present when the second was present, or the second was reported as |
| 73 // happening before the first. |
| 74 INVALID_ORDER_RESPONSE_START_PARSE_START, |
| 75 INVALID_ORDER_PARSE_START_PARSE_STOP, |
| 76 INVALID_ORDER_PARSE_STOP_DOM_CONTENT_LOADED, |
| 77 INVALID_ORDER_DOM_CONTENT_LOADED_LOAD, |
| 78 INVALID_ORDER_PARSE_START_FIRST_LAYOUT, |
| 79 INVALID_ORDER_FIRST_LAYOUT_FIRST_PAINT, |
| 80 INVALID_ORDER_FIRST_PAINT_FIRST_TEXT_PAINT, |
| 81 INVALID_ORDER_FIRST_PAINT_FIRST_IMAGE_PAINT, |
| 82 INVALID_ORDER_FIRST_PAINT_FIRST_CONTENTFUL_PAINT, |
| 83 INVALID_ORDER_FIRST_PAINT_FIRST_MEANINGFUL_PAINT, |
| 84 |
| 85 // New values should be added before this final entry. |
| 86 LAST_PAGE_LOAD_TIMING_STATUS |
| 87 }; |
| 45 | 88 |
| 46 } // namespace internal | 89 } // namespace internal |
| 47 | 90 |
| 48 // These errors are internal to the page_load_metrics subsystem and do not | 91 // These errors are internal to the page_load_metrics subsystem and do not |
| 49 // reflect actual errors that occur during a page load. | 92 // reflect actual errors that occur during a page load. |
| 50 // | 93 // |
| 51 // If you add elements to this enum, make sure you update the enum | 94 // If you add elements to this enum, make sure you update the enum |
| 52 // value in histograms.xml. Only add elements to the end to prevent | 95 // value in histograms.xml. Only add elements to the end to prevent |
| 53 // inconsistencies between versions. | 96 // inconsistencies between versions. |
| 54 enum InternalErrorLoadEvent { | 97 enum InternalErrorLoadEvent { |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 PageLoadMetricsEmbedderInterface* const embedder_interface_; | 396 PageLoadMetricsEmbedderInterface* const embedder_interface_; |
| 354 | 397 |
| 355 std::vector<std::unique_ptr<PageLoadMetricsObserver>> observers_; | 398 std::vector<std::unique_ptr<PageLoadMetricsObserver>> observers_; |
| 356 | 399 |
| 357 DISALLOW_COPY_AND_ASSIGN(PageLoadTracker); | 400 DISALLOW_COPY_AND_ASSIGN(PageLoadTracker); |
| 358 }; | 401 }; |
| 359 | 402 |
| 360 } // namespace page_load_metrics | 403 } // namespace page_load_metrics |
| 361 | 404 |
| 362 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ | 405 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ |
| OLD | NEW |