Bug 376374 places bookmarks backups should be only for --enable-places-bookmarks builds (r=sspitzer)
authordietrich@mozilla.com
Tue, 03 Apr 2007 11:11:03 -0700
changeset 298 032e56e7e75dd582881daca4249a55f78d2bd9d9
parent 297 904d9563bfc36fe99d538e6e051bb08c44b34c01
child 299 38319de219d40a33650cc4460ce1a7e0d9fc5b9f
push idunknown
push userunknown
push dateunknown
reviewerssspitzer
bugs376374
milestone1.9a4pre
Bug 376374 places bookmarks backups should be only for --enable-places-bookmarks builds (r=sspitzer)
toolkit/components/places/src/nsNavBookmarks.cpp
--- a/toolkit/components/places/src/nsNavBookmarks.cpp
+++ b/toolkit/components/places/src/nsNavBookmarks.cpp
@@ -2281,16 +2281,17 @@ nsNavBookmarks::RemoveObserver(nsINavBoo
 }
 
 /**
  * Called by the History service when shutting down
  */
 nsresult
 nsNavBookmarks::OnQuit()
 {
+#ifdef MOZ_PLACES_BOOKMARKS
   // get bookmarks file
   nsCOMPtr<nsIFile> bookmarksFile;
   nsresult rv = NS_GetSpecialDirectory(NS_APP_BOOKMARKS_50_FILE,
                                        getter_AddRefs(bookmarksFile));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // create if it doesn't exist
   PRBool exists;
@@ -2316,16 +2317,17 @@ nsNavBookmarks::OnQuit()
   rv = bookmarksPrefs->GetIntPref("max_backups", &numberOfBackups);
   if (NS_FAILED(rv))
     numberOfBackups = 5;
 
   if (numberOfBackups > 0) {
     rv = ArchiveBookmarksFile(numberOfBackups, PR_FALSE);
     NS_ENSURE_SUCCESS(rv, rv);
   }
+#endif
 
   return NS_OK;
 }
 
 /**
  *  ArchiveBookmarksFile()
  *
  *  Creates a dated backup once a day in <profile>/bookmarkbackups