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

Unified Diff: ui/base/page_transition_types.h

Issue 2562993002: Disallow [in]equality operator for PageTransition (Closed)
Patch Set: Disallow [in]equality operator for PageTransition Created 4 years 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 | « ios/web/web_state/ui/crw_web_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/page_transition_types.h
diff --git a/ui/base/page_transition_types.h b/ui/base/page_transition_types.h
index eafea5237651e9513b2677804968c8d265a18a66..1d2d420834c2d55dca9b77bf8eb510a47c1cb240 100644
--- a/ui/base/page_transition_types.h
+++ b/ui/base/page_transition_types.h
@@ -186,19 +186,18 @@ UI_BASE_EXPORT bool PageTransitionIsWebTriggerable(PageTransition type);
UI_BASE_EXPORT const char* PageTransitionGetCoreTransitionString(
PageTransition type);
-// TODO(joth): Remove the #if guard here; requires all chrome layer code to
-// be fixed up not to use operator==
-#if defined(CONTENT_IMPLEMENTATION)
// Declare a dummy class that is intentionally never defined.
class DontUseOperatorEquals;
-// Ban operator== as it's way too easy to forget to strip the qualifiers. Use
-// PageTransitionCoreTypeIs() instead or, in rare cases,
+// Ban operator== and operator!= as it's way too easy to forget to strip the
+// qualifiers. Use PageTransitionCoreTypeIs() instead or, in rare cases,
// PageTransitionTypeIncludingQualifiersIs().
DontUseOperatorEquals operator==(PageTransition, PageTransition);
DontUseOperatorEquals operator==(PageTransition, int);
DontUseOperatorEquals operator==(int, PageTransition);
-#endif // defined(CONTENT_IMPLEMENTATION)
+DontUseOperatorEquals operator!=(PageTransition, PageTransition);
+DontUseOperatorEquals operator!=(PageTransition, int);
+DontUseOperatorEquals operator!=(int, PageTransition);
} // namespace ui
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698