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 "chrome/browser/page_load_metrics/metrics_web_contents_observer.h" | 5 #include "chrome/browser/page_load_metrics/metrics_web_contents_observer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <ostream> | 8 #include <ostream> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 return false; | 149 return false; |
150 } | 150 } |
151 | 151 |
152 if (!EventsInOrder(timing.dom_loading, timing.first_layout)) { | 152 if (!EventsInOrder(timing.dom_loading, timing.first_layout)) { |
153 NOTREACHED() << "Invalid dom_loading " << timing.dom_loading | 153 NOTREACHED() << "Invalid dom_loading " << timing.dom_loading |
154 << " for first_layout " << timing.first_layout; | 154 << " for first_layout " << timing.first_layout; |
155 return false; | 155 return false; |
156 } | 156 } |
157 | 157 |
158 if (!EventsInOrder(timing.first_layout, timing.first_paint)) { | 158 if (!EventsInOrder(timing.first_layout, timing.first_paint)) { |
159 NOTREACHED() << "Invalid first_layout " << timing.first_layout | 159 // This can happen when we process an XHTML document that doesn't contain |
160 << " for first_paint " << timing.first_paint; | 160 // well formed XML. See crbug.com/627607. |
| 161 DLOG(ERROR) << "Invalid first_layout " << timing.first_layout |
| 162 << " for first_paint " << timing.first_paint; |
161 return false; | 163 return false; |
162 } | 164 } |
163 | 165 |
164 if (!EventsInOrder(timing.first_paint, timing.first_text_paint)) { | 166 if (!EventsInOrder(timing.first_paint, timing.first_text_paint)) { |
165 NOTREACHED() << "Invalid first_paint " << timing.first_paint | 167 NOTREACHED() << "Invalid first_paint " << timing.first_paint |
166 << " for first_text_paint " << timing.first_text_paint; | 168 << " for first_text_paint " << timing.first_text_paint; |
167 return false; | 169 return false; |
168 } | 170 } |
169 | 171 |
170 if (!EventsInOrder(timing.first_paint, timing.first_image_paint)) { | 172 if (!EventsInOrder(timing.first_paint, timing.first_image_paint)) { |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 if (navigation_handle->IsSamePage() || navigation_handle->IsErrorPage()) | 954 if (navigation_handle->IsSamePage() || navigation_handle->IsErrorPage()) |
953 return false; | 955 return false; |
954 const std::string& mime_type = web_contents()->GetContentsMimeType(); | 956 const std::string& mime_type = web_contents()->GetContentsMimeType(); |
955 if (mime_type != "text/html" && mime_type != "application/xhtml+xml") | 957 if (mime_type != "text/html" && mime_type != "application/xhtml+xml") |
956 return false; | 958 return false; |
957 } | 959 } |
958 return true; | 960 return true; |
959 } | 961 } |
960 | 962 |
961 } // namespace page_load_metrics | 963 } // namespace page_load_metrics |
OLD | NEW |