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

Unified Diff: ui/base/accelerators/accelerator_manager.cc

Issue 2128243003: Make most browser accelerators not repeat. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comment in test Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/accelerators/accelerator_manager.cc
diff --git a/ui/base/accelerators/accelerator_manager.cc b/ui/base/accelerators/accelerator_manager.cc
index 466b7b745e005a0fb70c583b44554c861d26733c..fad3bf66eebfd288ced3eb05e517c03de3b53e89 100644
--- a/ui/base/accelerators/accelerator_manager.cc
+++ b/ui/base/accelerators/accelerator_manager.cc
@@ -27,9 +27,9 @@ void AcceleratorManager::Register(const Accelerator& accelerator,
const bool is_first_target_for_accelerator = targets.empty();
// All priority accelerators go to the front of the line.
- if (priority) {
+ if (priority == kHighPriority) {
DCHECK(!accelerators_[accelerator].first)
- << "Only one _priority_ handler can be registered";
+ << "Only one high-priority handler can be registered";
targets.push_front(target);
// Mark that we have a priority accelerator at the front.
accelerators_[accelerator].first = true;
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698