diff --git a/toolkit/components/places/src/nsNavBookmarks.h b/toolkit/components/places/src/nsNavBookmarks.h index 2efe84fa75c..f88ff8004c2 100644 --- a/toolkit/components/places/src/nsNavBookmarks.h +++ b/toolkit/components/places/src/nsNavBookmarks.h @@ -110,8 +110,14 @@ private: PRInt64 mRoot; PRInt64 mBookmarksRoot; PRInt64 mToolbarRoot; + + // the level of nesting of batches, 0 when no batches are open PRInt32 mBatchLevel; + // true if the outermost batch has an associated transaction that should + // be committed when our batch level reaches 0 again. + PRBool mBatchHasTransaction; + nsCOMPtr mDBGetFolderInfo; // kGetFolderInfoIndex_* results nsCOMPtr mDBGetChildren; // kGetInfoIndex_* results + kGetChildrenIndex_* results @@ -140,4 +146,11 @@ private: PRInt64 aFolder); }; +struct nsBookmarksUpdateBatcher +{ + nsBookmarksUpdateBatcher() { nsNavBookmarks::GetBookmarksService()->BeginUpdateBatch(); } + ~nsBookmarksUpdateBatcher() { nsNavBookmarks::GetBookmarksService()->EndUpdateBatch(); } +}; + + #endif // nsNavBookmarks_h_