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

r=dietrich


git-svn-id: svn://10.0.0.236/trunk@232273 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sspitzer%mozilla.org
2007-08-17 17:54:58 +00:00
parent 90774053bf
commit 3143e362d0
2 changed files with 14 additions and 1 deletions

View File

@@ -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));

View File

@@ -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();