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

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

Issue 2761523002: Remove comparing PlatformAccelerator from operator== for Accelerator (Closed)
Patch Set: done Created 3 years, 9 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 | « ui/base/accelerators/accelerator.h ('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.cc
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
index 340e1263e39a4eb3e08ee7406653edb3cf9b388c..c97254441cece2c0f56237d516882bd6e629fb27 100644
--- a/ui/base/accelerators/accelerator.cc
+++ b/ui/base/accelerators/accelerator.cc
@@ -90,16 +90,9 @@ bool Accelerator::operator <(const Accelerator& rhs) const {
}
bool Accelerator::operator ==(const Accelerator& rhs) const {
- if ((key_code_ == rhs.key_code_) && (key_state_ == rhs.key_state_) &&
- (MaskOutKeyEventFlags(modifiers_) ==
- MaskOutKeyEventFlags(rhs.modifiers_)))
- return true;
-
- bool platform_equal =
- platform_accelerator_.get() && rhs.platform_accelerator_.get() &&
- platform_accelerator_.get() == rhs.platform_accelerator_.get();
-
- return platform_equal;
+ return (key_code_ == rhs.key_code_) && (key_state_ == rhs.key_state_) &&
+ (MaskOutKeyEventFlags(modifiers_) ==
+ MaskOutKeyEventFlags(rhs.modifiers_));
}
bool Accelerator::operator !=(const Accelerator& rhs) const {
« no previous file with comments | « ui/base/accelerators/accelerator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698