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

Side by Side Diff: chrome/browser/ui/views/ash/tab_scrubber.cc

Issue 551893002: Fix number of buckets in Tabs.ScrubDistance UMA histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/ui/views/ash/tab_scrubber.h" 5 #include "chrome/browser/ui/views/ash/tab_scrubber.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/window_util.h" 8 #include "ash/wm/window_util.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 BrowserView* browser_view = 267 BrowserView* browser_view =
268 BrowserView::GetBrowserViewForNativeWindow( 268 BrowserView::GetBrowserViewForNativeWindow(
269 browser_->window()->GetNativeWindow()); 269 browser_->window()->GetNativeWindow());
270 TabStrip* tab_strip = browser_view->tabstrip(); 270 TabStrip* tab_strip = browser_view->tabstrip();
271 if (activate && highlighted_tab_ != -1) { 271 if (activate && highlighted_tab_ != -1) {
272 Tab* tab = tab_strip->tab_at(highlighted_tab_); 272 Tab* tab = tab_strip->tab_at(highlighted_tab_);
273 tab->hover_controller()->HideImmediately(); 273 tab->hover_controller()->HideImmediately();
274 int distance = 274 int distance =
275 std::abs( 275 std::abs(
276 highlighted_tab_ - browser_->tab_strip_model()->active_index()); 276 highlighted_tab_ - browser_->tab_strip_model()->active_index());
277 UMA_HISTOGRAM_CUSTOM_COUNTS("Tabs.ScrubDistance", distance, 0, 20, 20); 277 UMA_HISTOGRAM_CUSTOM_COUNTS("Tabs.ScrubDistance", distance, 0, 20, 21);
278 browser_->tab_strip_model()->ActivateTabAt(highlighted_tab_, true); 278 browser_->tab_strip_model()->ActivateTabAt(highlighted_tab_, true);
279 } 279 }
280 tab_strip->RemoveObserver(this); 280 tab_strip->RemoveObserver(this);
281 } 281 }
282 swipe_x_ = -1; 282 swipe_x_ = -1;
283 swipe_y_ = -1; 283 swipe_y_ = -1;
284 scrubbing_ = false; 284 scrubbing_ = false;
285 highlighted_tab_ = -1; 285 highlighted_tab_ = -1;
286 } 286 }
OLDNEW
« 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