зеркало из https://github.com/mozilla/pjs.git
fix for bug #392192: first run migration / import from safari browser is slow, history import should use "run in batch"
r=sayrer
This commit is contained in:
Родитель
80b7a111ef
Коммит
d1c54e498b
|
@ -832,6 +832,16 @@ nsSafariProfileMigrator::CopyCookies(PRBool aReplace)
|
|||
|
||||
nsresult
|
||||
nsSafariProfileMigrator::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
|
||||
nsSafariProfileMigrator::RunBatched(nsISupports* aUserData)
|
||||
{
|
||||
nsCOMPtr<nsIProperties> fileLocator(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID));
|
||||
nsCOMPtr<nsILocalFile> safariHistoryFile;
|
||||
|
|
|
@ -43,15 +43,18 @@
|
|||
#include "nsIObserverService.h"
|
||||
#include "nsISupportsArray.h"
|
||||
#include "nsStringAPI.h"
|
||||
#include "nsINavHistoryService.h"
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
class nsIRDFDataSource;
|
||||
|
||||
class nsSafariProfileMigrator : public nsIBrowserProfileMigrator
|
||||
class nsSafariProfileMigrator : public nsIBrowserProfileMigrator,
|
||||
public nsINavHistoryBatchCallback
|
||||
{
|
||||
public:
|
||||
NS_DECL_NSIBROWSERPROFILEMIGRATOR
|
||||
NS_DECL_NSINAVHISTORYBATCHCALLBACK
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
nsSafariProfileMigrator();
|
||||
|
|
Загрузка…
Ссылка в новой задаче