Backing out backout of history changes.

This commit is contained in:
blakeross%telocity.com 2002-10-10 10:55:21 +00:00
Родитель dbdd3d4788
Коммит 44b75a7f19
2 изменённых файлов: 3 добавлений и 19 удалений

Просмотреть файл

@ -431,23 +431,6 @@ function WindowFocusTimerCallback(element)
}
}
function BrowserFlushBookmarksAndHistory()
{
// Flush bookmarks and history (used when window closes or is cached).
try {
// If bookmarks are dirty, flush 'em to disk
var bmks = Components.classes["@mozilla.org/browser/bookmarks-service;1"]
.getService(Components.interfaces.nsIRDFRemoteDataSource);
bmks.Flush();
// give history a chance at flushing to disk also
var history = Components.classes["@mozilla.org/browser/global-history;1"]
.getService(Components.interfaces.nsIRDFRemoteDataSource);
history.Flush();
} catch(ex) {
}
}
function Shutdown()
{
// remove remote support
@ -466,8 +449,6 @@ function Shutdown()
window.XULBrowserWindow.destroy();
window.XULBrowserWindow = null;
BrowserFlushBookmarksAndHistory();
window.browserContentListener.close();
// Close the app core.
if (appCore)

Просмотреть файл

@ -2358,6 +2358,7 @@ nsGlobalHistory::Init()
if (observerService) {
observerService->AddObserver(this, "profile-before-change", PR_TRUE);
observerService->AddObserver(this, "profile-do-change", PR_TRUE);
observerService->AddObserver(this, "quit-application", PR_TRUE);
}
return NS_OK;
@ -3464,6 +3465,8 @@ nsGlobalHistory::Observe(nsISupports *aSubject,
}
else if (!nsCRT::strcmp(aTopic, "profile-do-change"))
rv = OpenDB();
else if (!nsCRT::strcmp(aTopic, "quit-application"))
rv = Flush();
return NS_OK;
}