зеркало из https://github.com/mozilla/pjs.git
Bug 383481 Profile migration doesn't migrate userChrome.css. r=Neil
This commit is contained in:
Родитель
b824ef12cc
Коммит
fe42ffb45e
|
@ -836,12 +836,12 @@ nsNetscapeProfileMigratorBase::CopyPasswords(PRBool aReplace)
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsNetscapeProfileMigratorBase::CopyUserContentSheet()
|
||||
nsNetscapeProfileMigratorBase::CopyUserSheet(const char* aFileName)
|
||||
{
|
||||
nsCOMPtr<nsIFile> sourceUserContent;
|
||||
mSourceProfile->Clone(getter_AddRefs(sourceUserContent));
|
||||
sourceUserContent->Append(DIR_NAME_CHROME);
|
||||
sourceUserContent->AppendNative(NS_LITERAL_CSTRING(FILE_NAME_USERCONTENT));
|
||||
sourceUserContent->AppendNative(nsDependentCString(aFileName));
|
||||
|
||||
PRBool exists = PR_FALSE;
|
||||
sourceUserContent->Exists(&exists);
|
||||
|
@ -853,14 +853,14 @@ nsNetscapeProfileMigratorBase::CopyUserContentSheet()
|
|||
targetUserContent->Append(DIR_NAME_CHROME);
|
||||
nsCOMPtr<nsIFile> targetChromeDir;
|
||||
targetUserContent->Clone(getter_AddRefs(targetChromeDir));
|
||||
targetUserContent->AppendNative(NS_LITERAL_CSTRING(FILE_NAME_USERCONTENT));
|
||||
targetUserContent->AppendNative(nsDependentCString(aFileName));
|
||||
|
||||
targetUserContent->Exists(&exists);
|
||||
if (exists)
|
||||
targetUserContent->Remove(PR_FALSE);
|
||||
|
||||
return sourceUserContent->CopyTo(targetChromeDir,
|
||||
NS_LITERAL_STRING(FILE_NAME_USERCONTENT));
|
||||
return sourceUserContent->CopyToNative(targetChromeDir,
|
||||
nsDependentCString(aFileName));
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -158,7 +158,7 @@ protected:
|
|||
nsresult CopyCookies(PRBool aReplace);
|
||||
nsresult CopyFormData(PRBool aReplace);
|
||||
nsresult CopyPasswords(PRBool aReplace);
|
||||
nsresult CopyUserContentSheet();
|
||||
nsresult CopyUserSheet(const char* aFileName);
|
||||
nsresult GetSchemaValueFileName(PRBool aReplace, char** aFileName);
|
||||
nsresult GetSignonFileName(PRBool aReplace, char** aFileName);
|
||||
nsresult ImportNetscapeCookies(nsIFile* aCookiesFile);
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
#define FILE_NAME_USER_PREFS "user.js"
|
||||
#define FILE_NAME_PERSONALDICTIONARY "persdict.dat"
|
||||
#define FILE_NAME_MAILVIEWS "mailViews.dat"
|
||||
#define FILE_NAME_USERCHROME "userChrome.css"
|
||||
|
||||
NS_IMPL_ISUPPORTS2(nsSeamonkeyProfileMigrator, nsISuiteProfileMigrator,
|
||||
nsITimerCallback)
|
||||
|
@ -717,7 +718,9 @@ nsSeamonkeyProfileMigrator::CopyPreferences(PRBool aReplace)
|
|||
rv |= CopyFile(FILE_NAME_PERSONALDICTIONARY, FILE_NAME_PERSONALDICTIONARY);
|
||||
rv |= CopyFile(FILE_NAME_MAILVIEWS, FILE_NAME_MAILVIEWS);
|
||||
|
||||
return rv | CopyUserContentSheet();
|
||||
// User sheets
|
||||
rv |= CopyUserSheet(FILE_NAME_USERCHROME);
|
||||
return rv | CopyUserSheet(FILE_NAME_USERCONTENT);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -672,7 +672,7 @@ nsThunderbirdProfileMigrator::CopyPreferences(PRBool aReplace)
|
|||
rv |= CopyFile(FILE_NAME_PERSONALDICTIONARY, FILE_NAME_PERSONALDICTIONARY);
|
||||
rv |= CopyFile(FILE_NAME_MAILVIEWS, FILE_NAME_MAILVIEWS);
|
||||
|
||||
return rv | CopyUserContentSheet();
|
||||
return rv | CopyUserSheet(FILE_NAME_USERCONTENT);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
Загрузка…
Ссылка в новой задаче