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

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: Remove ENTRY_POINT_NONE 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 2387 matching lines...) Expand 10 before | Expand all | Expand 10 after
2398 } 2398 }
2399 #endif 2399 #endif
2400 } 2400 }
2401 2401
2402 void BrowserView::UpdateAcceleratorMetrics( 2402 void BrowserView::UpdateAcceleratorMetrics(
2403 const ui::Accelerator& accelerator, int command_id) { 2403 const ui::Accelerator& accelerator, int command_id) {
2404 const ui::KeyboardCode key_code = accelerator.key_code(); 2404 const ui::KeyboardCode key_code = accelerator.key_code();
2405 if (command_id == IDC_HELP_PAGE_VIA_KEYBOARD && key_code == ui::VKEY_F1) 2405 if (command_id == IDC_HELP_PAGE_VIA_KEYBOARD && key_code == ui::VKEY_F1)
2406 content::RecordAction(UserMetricsAction("ShowHelpTabViaF1")); 2406 content::RecordAction(UserMetricsAction("ShowHelpTabViaF1"));
2407 2407
2408 if (command_id == IDC_BOOKMARK_PAGE)
2409 UMA_HISTOGRAM_ENUMERATION("Bookmarks.EntryPoint",
2410 bookmark_utils::ENTRY_POINT_ACCELERATOR,
2411 bookmark_utils::ENTRY_POINT_LIMIT);
2412
2408 #if defined(OS_CHROMEOS) 2413 #if defined(OS_CHROMEOS)
2409 // Collect information about the relative popularity of various accelerators 2414 // Collect information about the relative popularity of various accelerators
2410 // on Chrome OS. 2415 // on Chrome OS.
2411 switch (command_id) { 2416 switch (command_id) {
2412 case IDC_BACK: 2417 case IDC_BACK:
2413 if (key_code == ui::VKEY_BACK) 2418 if (key_code == ui::VKEY_BACK)
2414 content::RecordAction(UserMetricsAction("Accel_Back_Backspace")); 2419 content::RecordAction(UserMetricsAction("Accel_Back_Backspace"));
2415 else if (key_code == ui::VKEY_F1) 2420 else if (key_code == ui::VKEY_F1)
2416 content::RecordAction(UserMetricsAction("Accel_Back_F1")); 2421 content::RecordAction(UserMetricsAction("Accel_Back_F1"));
2417 else if (key_code == ui::VKEY_LEFT) 2422 else if (key_code == ui::VKEY_LEFT)
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
2617 2622
2618 Browser* modal_browser = 2623 Browser* modal_browser =
2619 browser::FindBrowserWithWebContents(active_dialog->web_contents()); 2624 browser::FindBrowserWithWebContents(active_dialog->web_contents());
2620 if (modal_browser && (browser_ != modal_browser)) { 2625 if (modal_browser && (browser_ != modal_browser)) {
2621 modal_browser->window()->FlashFrame(true); 2626 modal_browser->window()->FlashFrame(true);
2622 modal_browser->window()->Activate(); 2627 modal_browser->window()->Activate();
2623 } 2628 }
2624 2629
2625 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); 2630 AppModalDialogQueue::GetInstance()->ActivateModalDialog();
2626 } 2631 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_utils.cc ('k') | chrome/browser/ui/views/location_bar/star_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698