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

Unified Diff: ui/gfx/size_base_impl.h

Issue 11823012: Remove DCHECK for negative sizes for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added TODO for removing ifdefs, referring to bug Created 7 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/size_base_impl.h
diff --git a/ui/gfx/size_base_impl.h b/ui/gfx/size_base_impl.h
index 9e87468a9b3f13c843ea7c367dbe85257b73dc44..99b11458f4adf341f0fc44c5c80c7f6253e7c331 100644
--- a/ui/gfx/size_base_impl.h
+++ b/ui/gfx/size_base_impl.h
@@ -16,13 +16,18 @@ namespace gfx {
template<typename Class, typename Type>
void SizeBase<Class, Type>::set_width(Type width) {
+#if !defined(OS_ANDROID)
+ // TODO(aelias): Remove these ifdefs for Android. See http://crbug.com/168927
DCHECK(!(width < 0));
+#endif
width_ = width < 0 ? 0 : width;
}
template<typename Class, typename Type>
void SizeBase<Class, Type>::set_height(Type height) {
+#if !defined(OS_ANDROID)
DCHECK(!(height < 0));
+#endif
height_ = height < 0 ? 0 : height;
}
@@ -30,8 +35,10 @@ template<typename Class, typename Type>
SizeBase<Class, Type>::SizeBase(Type width, Type height)
: width_(width < 0 ? 0 : width),
height_(height < 0 ? 0 : height) {
+#if !defined(OS_ANDROID)
DCHECK(!(width < 0));
DCHECK(!(height < 0));
+#endif
}
} // namespace gfx
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698