
The way it's written until now is counter-intuitive. This makes it intuitive. 1 - To make sure an int index is in the array range when we are adding we should check for: index >= 0 && index <= child_count(). So use DCHECK_GE for '>=' and DCHECK_LE for '<=' respectively. 2 - To make sure an int index is in the array range when we are retrieving it from vector we should check for: index >= 0 && index < child_count(). So use DCHECK_GE for '>=' and DCHECK_LT for '<' respectively. BUG=None TEST=app_unittests --gtest_filter=TreeNodeModelTest.* R=sky@chromium.org Review URL: http://codereview.chromium.org/7058030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87716 0039d316-1c4b-4281-b951-d872f2087c98
This directory contains elements of Chromium's user interface toolkit: base/ Common UI framework components for resource loading, localization, string formatting, cross platform model interfaces etc. views/ UI "View" framework used for building interfaces on Windows and Linux (ChromeOS). This directory is NOT for things that are unrelated to a user interface library, even if: * they are shared by multiple top level directories in src/, * brettw won't let you put them in base! * it's just two little files... come on! - ben@chromium.org