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

Issue 11280208: Re-factor navigateTo() in bookmark_manager/js/main.js (Closed)

Created:
8 years ago by yosin_UTC9
Modified:
8 years ago
CC:
chromium-reviews, kenjibaheux, yoichio
Visibility:
Public.

Description

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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=171119

Patch Set 1 : 2012-11-28T17:45 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -57 lines) Patch
M chrome/browser/resources/bookmark_manager/js/main.js View 10 chunks +33 lines, -57 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
yosin_UTC9
Hi Eric, Could you review this patch? Thanks in advance. This is the re-factoring of ...
8 years ago (2012-11-28 09:00:13 UTC) #1
yosin_UTC9
Hi Eric, Could you review this patch? This patch is not only re-factoring but also ...
8 years ago (2012-12-04 04:37:20 UTC) #2
arv (Not doing code reviews)
8 years ago (2012-12-04 15:30:40 UTC) #3
LGTM

Powered by Google App Engine
This is Rietveld 408576698