Bug 319910 r=bryner Add bookmark function for redirect-aware bookmark status checking

Original committer: brettw%gmail.com
Original revision: 1.21
Original date: 2006/02/28 17:53:16
This commit is contained in:
benjamin%smedbergs.us 2006-07-18 15:08:49 +00:00
parent 3c1889df13
commit c251968175

View File

@ -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<nsTrimInt64HashKey, PRInt64> mBookmarksHash;
nsresult FillBookmarksHash();
nsresult RecursiveAddBookmarkHash(PRInt64 aBookmarkId, PRInt64 aCurrentSource,
PRTime aMinTime);
nsresult UpdateBookmarkHashOnRemove(PRInt64 aBookmarkId);
nsresult IsBookmarkedInDatabase(PRInt64 aBookmarkID, PRBool* aIsBookmarked);
nsCOMPtr<mozIStorageStatement> mDBGetFolderInfo; // kGetFolderInfoIndex_* results
nsCOMPtr<mozIStorageStatement> mDBGetChildren; // kGetInfoIndex_* results + kGetChildrenIndex_* results
@ -138,6 +150,8 @@ private:
nsCOMPtr<mozIStorageStatement> mDBIndexOfFolder;
nsCOMPtr<mozIStorageStatement> mDBGetChildAt;
nsCOMPtr<mozIStorageStatement> mDBGetRedirectDestinations;
// keywords
nsCOMPtr<mozIStorageStatement> mDBGetKeywordForURI;
nsCOMPtr<mozIStorageStatement> mDBGetURIForKeyword;