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

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

Issue 1992003002: Re-add backspace-goes-back as a default disabled finch trial (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix assert in test Created 4 years, 7 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 2414 matching lines...) Expand 10 before | Expand all | Expand 10 after
2425 if (command_id == IDC_BOOKMARK_PAGE) 2425 if (command_id == IDC_BOOKMARK_PAGE)
2426 UMA_HISTOGRAM_ENUMERATION("Bookmarks.EntryPoint", 2426 UMA_HISTOGRAM_ENUMERATION("Bookmarks.EntryPoint",
2427 BOOKMARK_ENTRY_POINT_ACCELERATOR, 2427 BOOKMARK_ENTRY_POINT_ACCELERATOR,
2428 BOOKMARK_ENTRY_POINT_LIMIT); 2428 BOOKMARK_ENTRY_POINT_LIMIT);
2429 2429
2430 #if defined(OS_CHROMEOS) 2430 #if defined(OS_CHROMEOS)
2431 // Collect information about the relative popularity of various accelerators 2431 // Collect information about the relative popularity of various accelerators
2432 // on Chrome OS. 2432 // on Chrome OS.
2433 switch (command_id) { 2433 switch (command_id) {
2434 case IDC_BACK: 2434 case IDC_BACK:
2435 if (key_code == ui::VKEY_BROWSER_BACK) 2435 if (key_code == ui::VKEY_BACK)
2436 content::RecordAction(UserMetricsAction("Accel_Back_Backspace"));
Peter Kasting 2016/05/19 09:28:30 Will this and the bit below even be reached? Won'
ojan 2016/05/20 16:33:48 Ugh. Yeah. This just just from starting with a rev
2437 else if (key_code == ui::VKEY_BROWSER_BACK)
2436 content::RecordAction(UserMetricsAction("Accel_Back_F1")); 2438 content::RecordAction(UserMetricsAction("Accel_Back_F1"));
2437 else if (key_code == ui::VKEY_LEFT) 2439 else if (key_code == ui::VKEY_LEFT)
2438 content::RecordAction(UserMetricsAction("Accel_Back_Left")); 2440 content::RecordAction(UserMetricsAction("Accel_Back_Left"));
2439 break; 2441 break;
2440 case IDC_FORWARD: 2442 case IDC_FORWARD:
2441 if (key_code == ui::VKEY_BROWSER_FORWARD) 2443 if (key_code == ui::VKEY_BACK)
2444 content::RecordAction(UserMetricsAction("Accel_Forward_Backspace"));
2445 else if (key_code == ui::VKEY_BROWSER_FORWARD)
2442 content::RecordAction(UserMetricsAction("Accel_Forward_F2")); 2446 content::RecordAction(UserMetricsAction("Accel_Forward_F2"));
2443 else if (key_code == ui::VKEY_RIGHT) 2447 else if (key_code == ui::VKEY_RIGHT)
2444 content::RecordAction(UserMetricsAction("Accel_Forward_Right")); 2448 content::RecordAction(UserMetricsAction("Accel_Forward_Right"));
2445 break; 2449 break;
2446 case IDC_RELOAD: 2450 case IDC_RELOAD:
2447 case IDC_RELOAD_BYPASSING_CACHE: 2451 case IDC_RELOAD_BYPASSING_CACHE:
2448 if (key_code == ui::VKEY_R) 2452 if (key_code == ui::VKEY_R)
2449 content::RecordAction(UserMetricsAction("Accel_Reload_R")); 2453 content::RecordAction(UserMetricsAction("Accel_Reload_R"));
2450 else if (key_code == ui::VKEY_BROWSER_REFRESH) 2454 else if (key_code == ui::VKEY_BROWSER_REFRESH)
2451 content::RecordAction(UserMetricsAction("Accel_Reload_F3")); 2455 content::RecordAction(UserMetricsAction("Accel_Reload_F3"));
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
2636 } 2640 }
2637 2641
2638 extensions::ActiveTabPermissionGranter* 2642 extensions::ActiveTabPermissionGranter*
2639 BrowserView::GetActiveTabPermissionGranter() { 2643 BrowserView::GetActiveTabPermissionGranter() {
2640 content::WebContents* web_contents = GetActiveWebContents(); 2644 content::WebContents* web_contents = GetActiveWebContents();
2641 if (!web_contents) 2645 if (!web_contents)
2642 return nullptr; 2646 return nullptr;
2643 return extensions::TabHelper::FromWebContents(web_contents) 2647 return extensions::TabHelper::FromWebContents(web_contents)
2644 ->active_tab_permission_granter(); 2648 ->active_tab_permission_granter();
2645 } 2649 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698