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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef UI_BASE_PAGE_TRANSITION_TYPES_H_ 5 #ifndef UI_BASE_PAGE_TRANSITION_TYPES_H_
6 #define UI_BASE_PAGE_TRANSITION_TYPES_H_ 6 #define UI_BASE_PAGE_TRANSITION_TYPES_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "ui/base/ui_base_export.h" 10 #include "ui/base/ui_base_export.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 UI_BASE_EXPORT int32_t PageTransitionGetQualifier(PageTransition type); 179 UI_BASE_EXPORT int32_t PageTransitionGetQualifier(PageTransition type);
180 180
181 // Returns true if the transition can be triggered by the web instead of 181 // Returns true if the transition can be triggered by the web instead of
182 // through UI or similar. 182 // through UI or similar.
183 UI_BASE_EXPORT bool PageTransitionIsWebTriggerable(PageTransition type); 183 UI_BASE_EXPORT bool PageTransitionIsWebTriggerable(PageTransition type);
184 184
185 // Return a string version of the core type values. 185 // Return a string version of the core type values.
186 UI_BASE_EXPORT const char* PageTransitionGetCoreTransitionString( 186 UI_BASE_EXPORT const char* PageTransitionGetCoreTransitionString(
187 PageTransition type); 187 PageTransition type);
188 188
189 // TODO(joth): Remove the #if guard here; requires all chrome layer code to
190 // be fixed up not to use operator==
191 #if defined(CONTENT_IMPLEMENTATION)
192 // Declare a dummy class that is intentionally never defined. 189 // Declare a dummy class that is intentionally never defined.
193 class DontUseOperatorEquals; 190 class DontUseOperatorEquals;
194 191
195 // Ban operator== as it's way too easy to forget to strip the qualifiers. Use 192 // Ban operator== and operator!= as it's way too easy to forget to strip the
196 // PageTransitionCoreTypeIs() instead or, in rare cases, 193 // qualifiers. Use PageTransitionCoreTypeIs() instead or, in rare cases,
197 // PageTransitionTypeIncludingQualifiersIs(). 194 // PageTransitionTypeIncludingQualifiersIs().
198 DontUseOperatorEquals operator==(PageTransition, PageTransition); 195 DontUseOperatorEquals operator==(PageTransition, PageTransition);
199 DontUseOperatorEquals operator==(PageTransition, int); 196 DontUseOperatorEquals operator==(PageTransition, int);
200 DontUseOperatorEquals operator==(int, PageTransition); 197 DontUseOperatorEquals operator==(int, PageTransition);
201 #endif // defined(CONTENT_IMPLEMENTATION) 198 DontUseOperatorEquals operator!=(PageTransition, PageTransition);
199 DontUseOperatorEquals operator!=(PageTransition, int);
200 DontUseOperatorEquals operator!=(int, PageTransition);
202 201
203 } // namespace ui 202 } // namespace ui
204 203
205 #endif // UI_BASE_PAGE_TRANSITION_TYPES_H_ 204 #endif // UI_BASE_PAGE_TRANSITION_TYPES_H_
OLDNEW
« 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