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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 10917062: Add bookmark entry point histogram for bookmark prompt experiment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update chrome/tools/chromeactions.txt for BookmarkAdded Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after
2396 } 2396 }
2397 #endif 2397 #endif
2398 } 2398 }
2399 2399
2400 void BrowserView::UpdateAcceleratorMetrics( 2400 void BrowserView::UpdateAcceleratorMetrics(
2401 const ui::Accelerator& accelerator, int command_id) { 2401 const ui::Accelerator& accelerator, int command_id) {
2402 const ui::KeyboardCode key_code = accelerator.key_code(); 2402 const ui::KeyboardCode key_code = accelerator.key_code();
2403 if (command_id == IDC_HELP_PAGE_VIA_KEYBOARD && key_code == ui::VKEY_F1) 2403 if (command_id == IDC_HELP_PAGE_VIA_KEYBOARD && key_code == ui::VKEY_F1)
2404 content::RecordAction(UserMetricsAction("ShowHelpTabViaF1")); 2404 content::RecordAction(UserMetricsAction("ShowHelpTabViaF1"));
2405 2405
2406 if (command_id == IDC_BOOKMARK_PAGE)
2407 UMA_HISTOGRAM_ENUMERATION("Bookmarks.EntryPoint",
2408 bookmark_utils::ENTRY_POINT_ACCELERATOR,
2409 bookmark_utils::ENTRY_POINT_LIMIT);
2410
2406 #if defined(OS_CHROMEOS) 2411 #if defined(OS_CHROMEOS)
2407 // Collect information about the relative popularity of various accelerators 2412 // Collect information about the relative popularity of various accelerators
2408 // on Chrome OS. 2413 // on Chrome OS.
2409 switch (command_id) { 2414 switch (command_id) {
2410 case IDC_BACK: 2415 case IDC_BACK:
2411 if (key_code == ui::VKEY_BACK) 2416 if (key_code == ui::VKEY_BACK)
2412 content::RecordAction(UserMetricsAction("Accel_Back_Backspace")); 2417 content::RecordAction(UserMetricsAction("Accel_Back_Backspace"));
2413 else if (key_code == ui::VKEY_F1) 2418 else if (key_code == ui::VKEY_F1)
2414 content::RecordAction(UserMetricsAction("Accel_Back_F1")); 2419 content::RecordAction(UserMetricsAction("Accel_Back_F1"));
2415 else if (key_code == ui::VKEY_LEFT) 2420 else if (key_code == ui::VKEY_LEFT)
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
2615 2620
2616 Browser* modal_browser = 2621 Browser* modal_browser =
2617 browser::FindBrowserWithWebContents(active_dialog->web_contents()); 2622 browser::FindBrowserWithWebContents(active_dialog->web_contents());
2618 if (modal_browser && (browser_ != modal_browser)) { 2623 if (modal_browser && (browser_ != modal_browser)) {
2619 modal_browser->window()->FlashFrame(true); 2624 modal_browser->window()->FlashFrame(true);
2620 modal_browser->window()->Activate(); 2625 modal_browser->window()->Activate();
2621 } 2626 }
2622 2627
2623 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); 2628 AppModalDialogQueue::GetInstance()->ActivateModalDialog();
2624 } 2629 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698