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

Unified Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 16832003: Add UMA metrics to measure the effectiveness of views fuzzing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for landing Created 7 years, 6 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 | « chrome/browser/ui/views/tabs/tab.cc ('k') | chrome/browser/ui/views/touch_uma/touch_uma.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab_strip.cc
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index 9a9cbe27235372297376aef6391aa08d1d5a9e90..e0356c8cc2fc3cf955c40c86c119c24503db4a4c 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -25,6 +25,7 @@
#include "chrome/browser/ui/views/tabs/tab_drag_controller.h"
#include "chrome/browser/ui/views/tabs/tab_strip_controller.h"
#include "chrome/browser/ui/views/tabs/tab_strip_observer.h"
+#include "chrome/browser/ui/views/touch_uma/touch_uma.h"
#include "content/public/browser/user_metrics.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -1495,6 +1496,8 @@ void TabStrip::ButtonPressed(views::Button* sender, const ui::Event& event) {
UMA_HISTOGRAM_ENUMERATION("Tab.NewTab", TabStripModel::NEW_TAB_BUTTON,
TabStripModel::NEW_TAB_ENUM_COUNT);
controller()->CreateNewTab();
+ if (event.type() == ui::ET_GESTURE_TAP)
+ TouchUMA::RecordGestureAction(TouchUMA::GESTURE_NEWTAB_TAP);
}
}
@@ -1583,6 +1586,17 @@ void TabStrip::OnGestureEvent(ui::GestureEvent* event) {
EndDrag(END_DRAG_CANCEL);
break;
+ case ui::ET_GESTURE_TAP: {
+ const int active_index = controller_->GetActiveIndex();
+ DCHECK_NE(-1, active_index);
+ Tab* active_tab = tab_at(active_index);
+ TouchUMA::GestureActionType action = TouchUMA::GESTURE_TABNOSWITCH_TAP;
+ if (active_tab->tab_activated_with_last_gesture_begin())
+ action = TouchUMA::GESTURE_TABSWITCH_TAP;
+ TouchUMA::RecordGestureAction(action);
+ break;
+ }
+
default:
break;
}
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | chrome/browser/ui/views/touch_uma/touch_uma.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698