Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: chrome/browser/page_load_metrics/metrics_web_contents_observer.cc

Issue 2039363003: FirstMeaningfulPaint UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ready for review Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 observer->OnDomContentLoadedEventStart(new_timing, extra_info); 219 observer->OnDomContentLoadedEventStart(new_timing, extra_info);
220 if (new_timing.load_event_start && !last_timing.load_event_start) 220 if (new_timing.load_event_start && !last_timing.load_event_start)
221 observer->OnLoadEventStart(new_timing, extra_info); 221 observer->OnLoadEventStart(new_timing, extra_info);
222 if (new_timing.first_layout && !last_timing.first_layout) 222 if (new_timing.first_layout && !last_timing.first_layout)
223 observer->OnFirstLayout(new_timing, extra_info); 223 observer->OnFirstLayout(new_timing, extra_info);
224 if (new_timing.first_paint && !last_timing.first_paint) 224 if (new_timing.first_paint && !last_timing.first_paint)
225 observer->OnFirstPaint(new_timing, extra_info); 225 observer->OnFirstPaint(new_timing, extra_info);
226 if (new_timing.first_text_paint && !last_timing.first_text_paint) 226 if (new_timing.first_text_paint && !last_timing.first_text_paint)
227 observer->OnFirstTextPaint(new_timing, extra_info); 227 observer->OnFirstTextPaint(new_timing, extra_info);
228 if (new_timing.first_image_paint && !last_timing.first_image_paint) 228 if (new_timing.first_image_paint && !last_timing.first_image_paint)
229 observer->OnFirstImagePaint(new_timing, extra_info); 229 observer->OnFirstImagePaint(new_timing, extra_info);
Bryan McQuade 2016/07/29 15:02:26 there's also some logic in this file that validate
Kunihiko Sakamoto 2016/08/01 08:52:06 Done. The only ordering we can guarantee is FP <=
Kunihiko Sakamoto 2016/08/02 03:19:37 Um, actually that wasn't true... If the page has n
230 if (new_timing.first_contentful_paint && !last_timing.first_contentful_paint) 230 if (new_timing.first_contentful_paint && !last_timing.first_contentful_paint)
231 observer->OnFirstContentfulPaint(new_timing, extra_info); 231 observer->OnFirstContentfulPaint(new_timing, extra_info);
232 if (new_timing.first_meaningful_paint && !last_timing.first_meaningful_paint)
233 observer->OnFirstMeaningfulPaint(new_timing, extra_info);
232 if (new_timing.parse_start && !last_timing.parse_start) 234 if (new_timing.parse_start && !last_timing.parse_start)
233 observer->OnParseStart(new_timing, extra_info); 235 observer->OnParseStart(new_timing, extra_info);
234 if (new_timing.parse_stop && !last_timing.parse_stop) 236 if (new_timing.parse_stop && !last_timing.parse_stop)
235 observer->OnParseStop(new_timing, extra_info); 237 observer->OnParseStop(new_timing, extra_info);
236 if (extra_info.metadata.behavior_flags != last_metadata.behavior_flags) 238 if (extra_info.metadata.behavior_flags != last_metadata.behavior_flags)
237 observer->OnLoadingBehaviorObserved(extra_info); 239 observer->OnLoadingBehaviorObserved(extra_info);
238 } 240 }
239 241
240 } // namespace 242 } // namespace
241 243
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 if (navigation_handle->IsSamePage() || navigation_handle->IsErrorPage()) 953 if (navigation_handle->IsSamePage() || navigation_handle->IsErrorPage())
952 return false; 954 return false;
953 const std::string& mime_type = web_contents()->GetContentsMimeType(); 955 const std::string& mime_type = web_contents()->GetContentsMimeType();
954 if (mime_type != "text/html" && mime_type != "application/xhtml+xml") 956 if (mime_type != "text/html" && mime_type != "application/xhtml+xml")
955 return false; 957 return false;
956 } 958 }
957 return true; 959 return true;
958 } 960 }
959 961
960 } // namespace page_load_metrics 962 } // namespace page_load_metrics
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698