diff options
author | yosin@chromium.org <yosin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-05 01:42:39 +0000 |
---|---|---|
committer | yosin@chromium.org <yosin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-05 01:42:39 +0000 |
commit | 51772fa550db198e7741414aeded8848191b6308 (patch) | |
tree | c6f8d13bc654c1bd6426f9d75306265a1110b03c /ash/test | |
parent | efd7db46985316cdd1da2b15ea02c8c520eab057 (diff) | |
download | chromium_src-51772fa550db198e7741414aeded8848191b6308.zip chromium_src-51772fa550db198e7741414aeded8848191b6308.tar.gz chromium_src-51772fa550db198e7741414aeded8848191b6308.tar.bz2 |
This patch changes navigateTo() function to simplify code:
- Remove addOneShortEventListener + navigateTo pattern.
- Remove if (list.parentId == newParentId) pattern.
- Replace boolean parameter opt_updateHashNow to callback function to avoid using boolean argument.
This patch also fixes bug 163582 to set focus to folder name input box at right time.
This re-factoring reduces 30 lines of total code size.
* navigateTo(): Change to take callback to call at BookmarkList.load event.
* updateParentId(): Add comments and replace if-statement by conditional operator.
* showInFolder(): Change to check whether list.selectedItem is null or not, before using it. Rename callback function for navigateTo() from f() to selectItem().
* newFolder(): Change to set edit mode for new folder after navigateTo().
Related review:
https://codereview.chromium.org/11411162
BUG=163582
Review URL: https://codereview.chromium.org/11280208
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171119 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test')
0 files changed, 0 insertions, 0 deletions