bookmarks: BookmarkNodeData's size() cleanups.
* Fix the implementation of has_single_url() method. It is incorrect to check is_valid() because the elements vector can contain more than 1 item. And thus the is_valid() check does not make sense, since it just check if the vector is not empty, not that it just contains one element. * Use is_valid() method when possible. * Use has_single_url() method when it makes sense. * Use data.size() to avoid a temp variable. BUG=None TEST=chrome still links and works as before, existing unit tests in components_unittests. R=sky@chromium.org Review URL: https://codereview.chromium.org/870293002 Cr-Commit-Position: refs/heads/master@{#313702}
Showing
Please register or sign in to comment