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

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: Created 4 years, 5 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
Index: ui/base/accelerators/accelerator_manager.cc
diff --git a/ui/base/accelerators/accelerator_manager.cc b/ui/base/accelerators/accelerator_manager.cc
index fdd2e0aa6344f0a83d4f91249652aa8cc83072fc..d27171bf4c9504548b0a12108b4efb990fd61d13 100644
--- a/ui/base/accelerators/accelerator_manager.cc
+++ b/ui/base/accelerators/accelerator_manager.cc
@@ -25,9 +25,9 @@ void AcceleratorManager::Register(const Accelerator& accelerator,
<< "Registering the same target multiple times";
// All priority accelerators go to the front of the line.
- if (priority) {
+ if (priority == kHighPriority) {
Daniel Erat 2016/07/07 21:08:50 this isn't exactly related but i saw the old code
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;

Powered by Google App Engine
This is Rietveld 408576698