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

Unified Diff: chrome/browser/ui/views/ash/tab_scrubber.cc

Issue 12315136: Add uma histogram for tab scrubbing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/ash/tab_scrubber.cc
diff --git a/chrome/browser/ui/views/ash/tab_scrubber.cc b/chrome/browser/ui/views/ash/tab_scrubber.cc
index 6fc5a71c7f25c398006805be0d615cab87a56198..1de84157e81a07e3061a5f6e5d63a3aaee077386 100644
--- a/chrome/browser/ui/views/ash/tab_scrubber.cc
+++ b/chrome/browser/ui/views/ash/tab_scrubber.cc
@@ -6,6 +6,7 @@
#include "ash/shell.h"
#include "ash/wm/window_util.h"
+#include "base/metrics/histogram.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
@@ -261,6 +262,10 @@ void TabScrubber::FinishScrub(bool activate) {
if (activate && highlighted_tab_ != -1) {
Tab* tab = tab_strip->tab_at(highlighted_tab_);
tab->hover_controller()->HideImmediately();
+ int distance =
+ std::abs(
+ highlighted_tab_ - browser_->tab_strip_model()->active_index());
+ UMA_HISTOGRAM_CUSTOM_COUNTS("TabScrubber.Distance", distance, 0, 20, 20);
browser_->tab_strip_model()->ActivateTabAt(highlighted_tab_, true);
}
tab_strip->RemoveObserver(this);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698