Skip to content

Commit

Permalink
Ensure that the last used bookmark folder is actually a folder.
Browse files Browse the repository at this point in the history
If the user has been creating and deleting bookmarks and bookmark folders
recently, the ID of the last used bookmark folder may actually now correspond to
a bookmark -- not a folder. Detect and correct this situation.

BUG=365933
NOTRY=true

Review URL: https://codereview.chromium.org/247283004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265820 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
newt@chromium.org committed Apr 24, 2014
1 parent 535febf commit ee370db
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ private BookmarkNode getDefaultBookmarkFolder() {
// then use the synced node (Mobile Bookmarks).
BookmarkNode lastModified = getBookmarkNode(getLastModifiedBookmarkFolderId(), false, false,
false, false);
if (lastModified == null) {
if (lastModified == null || lastModified.isUrl()) {
lastModified = getMobileBookmarksFolder();
mLastModifiedBookmarkFolderId = lastModified != null ? lastModified.id() :
INVALID_BOOKMARK_ID;
Expand Down

0 comments on commit ee370db

Please sign in to comment.