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

Unified Diff: chrome/browser/win/jumplist.cc

Issue 2860573005: Log runtime of StartLoadingFavicon and OnFaviconDataAvailable for JumpList (Closed)
Patch Set: Add TODO to remove the UMA metric. Created 3 years, 8 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 | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/win/jumplist.cc
diff --git a/chrome/browser/win/jumplist.cc b/chrome/browser/win/jumplist.cc
index a9e27e77aa8de0baf1e25e1aa45957d14cd94f49..8af48d52caa956e1e91d96553275dac62291eee5 100644
--- a/chrome/browser/win/jumplist.cc
+++ b/chrome/browser/win/jumplist.cc
@@ -580,6 +580,8 @@ void JumpList::AddWindow(const sessions::TabRestoreService::Window& window,
void JumpList::StartLoadingFavicon() {
DCHECK(CalledOnValidThread());
+ base::ElapsedTimer timer;
+
GURL url;
bool waiting_for_icons = true;
{
@@ -607,12 +609,18 @@ void JumpList::StartLoadingFavicon() {
url,
base::Bind(&JumpList::OnFaviconDataAvailable, base::Unretained(this)),
&cancelable_task_tracker_);
+
+ // TODO(chengx): Remove the UMA histogram after fixing http://crbug.com/717236
+ UMA_HISTOGRAM_TIMES("WinJumplist.StartLoadingFaviconDuration",
+ timer.Elapsed());
}
void JumpList::OnFaviconDataAvailable(
const favicon_base::FaviconImageResult& image_result) {
DCHECK(CalledOnValidThread());
+ base::ElapsedTimer timer;
+
// If there is currently a favicon request in progress, it is now outdated,
// as we have received another, so nullify the handle from the old request.
task_id_ = base::CancelableTaskTracker::kBadTaskId;
@@ -634,6 +642,11 @@ void JumpList::OnFaviconDataAvailable(
if (!data->icon_urls_.empty())
data->icon_urls_.pop_front();
}
+
+ // TODO(chengx): Remove the UMA histogram after fixing http://crbug.com/717236
+ UMA_HISTOGRAM_TIMES("WinJumplist.OnFaviconDataAvailableDuration",
+ timer.Elapsed());
+
// Check whether we need to load more favicons.
StartLoadingFavicon();
}
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698