diff --git a/toolkit/components/places/src/nsNavBookmarks.h b/toolkit/components/places/src/nsNavBookmarks.h index 5e70b8df2000..380dc5f4b062 100644 --- a/toolkit/components/places/src/nsNavBookmarks.h +++ b/toolkit/components/places/src/nsNavBookmarks.h @@ -42,6 +42,7 @@ #include "nsINavBookmarksService.h" #include "nsIStringBundle.h" #include "nsNavHistory.h" +#include "nsNavHistoryResult.h" // need for Int64 hashtable #include "nsBrowserCompsCID.h" class nsNavBookmarks : public nsINavBookmarksService, @@ -65,6 +66,8 @@ public: return sInstance; } + nsresult AddBookmarkToHash(PRInt64 aBookmarkId, PRTime aMinTime); + nsresult ResultNodeForFolder(PRInt64 aID, nsNavHistoryQueryOptions *aOptions, nsNavHistoryResultNode **aNode); @@ -118,6 +121,15 @@ private: // be committed when our batch level reaches 0 again. PRBool mBatchHasTransaction; + // This stores a mapping from all pages reachable by redirects from bookmarked + // pages to the bookmarked page. Used by GetBookmarkedURIFor. + nsDataHashtable mBookmarksHash; + nsresult FillBookmarksHash(); + nsresult RecursiveAddBookmarkHash(PRInt64 aBookmarkId, PRInt64 aCurrentSource, + PRTime aMinTime); + nsresult UpdateBookmarkHashOnRemove(PRInt64 aBookmarkId); + nsresult IsBookmarkedInDatabase(PRInt64 aBookmarkID, PRBool* aIsBookmarked); + nsCOMPtr mDBGetFolderInfo; // kGetFolderInfoIndex_* results nsCOMPtr mDBGetChildren; // kGetInfoIndex_* results + kGetChildrenIndex_* results @@ -138,6 +150,8 @@ private: nsCOMPtr mDBIndexOfFolder; nsCOMPtr mDBGetChildAt; + nsCOMPtr mDBGetRedirectDestinations; + // keywords nsCOMPtr mDBGetKeywordForURI; nsCOMPtr mDBGetURIForKeyword;