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

Unified Diff: chrome/browser/ui/browser.cc

Issue 1001623002: Add profiling to track jank in ResourceDispatcherHostImpl::UpdateLoadInfoOnUIThread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 28413b773deafed2b9af37109f9424c11c614560..b9142a2765b820a30e8163142131109ecad60609 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -19,6 +19,7 @@
#include "base/metrics/histogram.h"
#include "base/prefs/pref_service.h"
#include "base/process/process_info.h"
+#include "base/profiler/scoped_tracker.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
@@ -1388,10 +1389,20 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
void Browser::NavigationStateChanged(WebContents* source,
content::InvalidateTypes changed_flags) {
+ // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285
+ // is fixed.
+ tracked_objects::ScopedTracker tracking_profile1(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "466285 Browser::NavigationStateChanged::ScheduleUIUpdate"));
// Only update the UI when something visible has changed.
if (changed_flags)
ScheduleUIUpdate(source, changed_flags);
+ // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285
+ // is fixed.
+ tracked_objects::ScopedTracker tracking_profile2(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "466285 Browser::NavigationStateChanged::TabStateChanged"));
// We can synchronously update commands since they will only change once per
// navigation, so we don't have to worry about flickering. We do, however,
// need to update the command state early on load to always present usable
@@ -2107,6 +2118,11 @@ void Browser::ScheduleUIUpdate(WebContents* source,
int index = tab_strip_model_->GetIndexOfWebContents(source);
DCHECK_NE(TabStripModel::kNoTab, index);
+ // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285
+ // is fixed.
+ tracked_objects::ScopedTracker tracking_profile1(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "466285 Browser::ScheduleUIUpdate::Toolbar"));
// Do some synchronous updates.
if (changed_flags & content::INVALIDATE_TYPE_URL) {
if (source == tab_strip_model_->GetActiveWebContents()) {
@@ -2122,6 +2138,12 @@ void Browser::ScheduleUIUpdate(WebContents* source,
}
changed_flags &= ~content::INVALIDATE_TYPE_URL;
}
+
+ // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285
+ // is fixed.
+ tracked_objects::ScopedTracker tracking_profile2(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "466285 Browser::ScheduleUIUpdate::TabStripModel"));
if (changed_flags & content::INVALIDATE_TYPE_LOAD) {
// Update the loading state synchronously. This is so the throbber will
// immediately start/stop, which gives a more snappy feel. We want to do
« no previous file with comments | « no previous file | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698