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 #include "components/page_load_metrics/browser/metrics_web_contents_observer.h" | 5 #include "components/page_load_metrics/browser/metrics_web_contents_observer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 const base::TimeDelta parse_duration = | 111 const base::TimeDelta parse_duration = |
112 timing.parse_stop - timing.parse_start; | 112 timing.parse_stop - timing.parse_start; |
113 if (timing.parse_blocked_on_script_load_duration > parse_duration) { | 113 if (timing.parse_blocked_on_script_load_duration > parse_duration) { |
114 NOTREACHED() << "Invalid parse_blocked_on_script_load_duration " | 114 NOTREACHED() << "Invalid parse_blocked_on_script_load_duration " |
115 << timing.parse_blocked_on_script_load_duration | 115 << timing.parse_blocked_on_script_load_duration |
116 << " for parse duration " << parse_duration; | 116 << " for parse duration " << parse_duration; |
117 return false; | 117 return false; |
118 } | 118 } |
119 } | 119 } |
120 | 120 |
| 121 if (timing.parse_blocked_on_script_load_from_document_write_duration > |
| 122 timing.parse_blocked_on_script_load_duration) { |
| 123 NOTREACHED() |
| 124 << "Invalid parse_blocked_on_script_load_from_document_write_duration " |
| 125 << timing.parse_blocked_on_script_load_from_document_write_duration |
| 126 << " for parse_blocked_on_script_load_duration " |
| 127 << timing.parse_blocked_on_script_load_duration; |
| 128 return false; |
| 129 } |
| 130 |
121 if (!EventsInOrder(timing.dom_loading, | 131 if (!EventsInOrder(timing.dom_loading, |
122 timing.dom_content_loaded_event_start)) { | 132 timing.dom_content_loaded_event_start)) { |
123 NOTREACHED() << "Invalid dom_loading " << timing.dom_loading | 133 NOTREACHED() << "Invalid dom_loading " << timing.dom_loading |
124 << " for dom_content_loaded_event_start " | 134 << " for dom_content_loaded_event_start " |
125 << timing.dom_content_loaded_event_start; | 135 << timing.dom_content_loaded_event_start; |
126 return false; | 136 return false; |
127 } | 137 } |
128 | 138 |
129 if (!EventsInOrder(timing.dom_content_loaded_event_start, | 139 if (!EventsInOrder(timing.dom_content_loaded_event_start, |
130 timing.load_event_start)) { | 140 timing.load_event_start)) { |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 | 715 |
706 if (!committed_load_->UpdateTiming(timing)) { | 716 if (!committed_load_->UpdateTiming(timing)) { |
707 // If the page load tracker cannot update its timing, something is wrong | 717 // If the page load tracker cannot update its timing, something is wrong |
708 // with the IPC (it's from another load, or it's invalid in some other way). | 718 // with the IPC (it's from another load, or it's invalid in some other way). |
709 // We expect this to be a rare occurrence. | 719 // We expect this to be a rare occurrence. |
710 RecordInternalError(ERR_BAD_TIMING_IPC); | 720 RecordInternalError(ERR_BAD_TIMING_IPC); |
711 } | 721 } |
712 } | 722 } |
713 | 723 |
714 } // namespace page_load_metrics | 724 } // namespace page_load_metrics |
OLD | NEW |