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

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: 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 2381 matching lines...) Expand 10 before | Expand all | Expand 10 after
2392 } 2392 }
2393 #endif 2393 #endif
2394 } 2394 }
2395 2395
2396 void BrowserView::UpdateAcceleratorMetrics( 2396 void BrowserView::UpdateAcceleratorMetrics(
2397 const ui::Accelerator& accelerator, int command_id) { 2397 const ui::Accelerator& accelerator, int command_id) {
2398 const ui::KeyboardCode key_code = accelerator.key_code(); 2398 const ui::KeyboardCode key_code = accelerator.key_code();
2399 if (command_id == IDC_HELP_PAGE_VIA_KEYBOARD && key_code == ui::VKEY_F1) 2399 if (command_id == IDC_HELP_PAGE_VIA_KEYBOARD && key_code == ui::VKEY_F1)
2400 content::RecordAction(UserMetricsAction("ShowHelpTabViaF1")); 2400 content::RecordAction(UserMetricsAction("ShowHelpTabViaF1"));
2401 2401
2402 if (command_id == IDC_BOOKMARK_PAGE)
2403 UMA_HISTOGRAM_ENUMERATION("Bookmarks.EntryPoint", location,
2404 BOOKMARK_ENTRY_POINT_ACCELERATOR);
2405
2402 #if defined(OS_CHROMEOS) 2406 #if defined(OS_CHROMEOS)
2403 // Collect information about the relative popularity of various accelerators 2407 // Collect information about the relative popularity of various accelerators
2404 // on Chrome OS. 2408 // on Chrome OS.
2405 switch (command_id) { 2409 switch (command_id) {
2406 case IDC_BACK: 2410 case IDC_BACK:
2407 if (key_code == ui::VKEY_BACK) 2411 if (key_code == ui::VKEY_BACK)
2408 content::RecordAction(UserMetricsAction("Accel_Back_Backspace")); 2412 content::RecordAction(UserMetricsAction("Accel_Back_Backspace"));
2409 else if (key_code == ui::VKEY_F1) 2413 else if (key_code == ui::VKEY_F1)
2410 content::RecordAction(UserMetricsAction("Accel_Back_F1")); 2414 content::RecordAction(UserMetricsAction("Accel_Back_F1"));
2411 else if (key_code == ui::VKEY_LEFT) 2415 else if (key_code == ui::VKEY_LEFT)
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
2610 2614
2611 Browser* modal_browser = 2615 Browser* modal_browser =
2612 browser::FindBrowserWithWebContents(active_dialog->web_contents()); 2616 browser::FindBrowserWithWebContents(active_dialog->web_contents());
2613 if (modal_browser && (browser_ != modal_browser)) { 2617 if (modal_browser && (browser_ != modal_browser)) {
2614 modal_browser->window()->FlashFrame(true); 2618 modal_browser->window()->FlashFrame(true);
2615 modal_browser->window()->Activate(); 2619 modal_browser->window()->Activate();
2616 } 2620 }
2617 2621
2618 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); 2622 AppModalDialogQueue::GetInstance()->ActivateModalDialog();
2619 } 2623 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698