fix for bug #392192: first run migration / import from opera browser is slow, history import should use "run in batch"

r=dietrich
This commit is contained in:
sspitzer%mozilla.org 2007-08-17 17:54:58 +00:00
Родитель 8587e9d0fd
Коммит a3d8dc5a82
2 изменённых файлов: 14 добавлений и 1 удалений

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

@ -962,6 +962,16 @@ nsOperaCookieMigrator::ReadHeader()
nsresult
nsOperaProfileMigrator::CopyHistory(PRBool aReplace)
{
nsresult rv;
nsCOMPtr<nsINavHistoryService> history = do_GetService(NS_NAVHISTORYSERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
return history->RunInBatchMode(this, nsnull);
}
NS_IMETHODIMP
nsOperaProfileMigrator::RunBatched(nsISupports* aUserData)
{
nsCOMPtr<nsIBrowserHistory> hist(do_GetService(NS_GLOBALHISTORY2_CONTRACTID));

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

@ -45,6 +45,7 @@
#include "nsISupportsArray.h"
#include "nsStringAPI.h"
#include "nsVoidArray.h"
#include "nsINavHistoryService.h"
class nsICookieManager2;
class nsILineInputStream;
@ -55,10 +56,12 @@ class nsIPrefBranch;
class nsINavBookmarksService;
class nsIRDFResource;
class nsOperaProfileMigrator : public nsIBrowserProfileMigrator
class nsOperaProfileMigrator : public nsIBrowserProfileMigrator,
public nsINavHistoryBatchCallback
{
public:
NS_DECL_NSIBROWSERPROFILEMIGRATOR
NS_DECL_NSINAVHISTORYBATCHCALLBACK
NS_DECL_ISUPPORTS
nsOperaProfileMigrator();