Follow up to Bug 390198 - merge functions into one to reduce code size now there's only one caller.
git-svn-id: svn://10.0.0.236/trunk@231927 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
68e58766e0
commit
77248e6a1d
@ -844,26 +844,6 @@ nsNetscapeProfileMigratorBase::CopyUserSheet(const char* aFileName)
|
||||
nsDependentCString(aFileName));
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsNetscapeProfileMigratorBase::GetSignonFileName(PRBool aReplace,
|
||||
char** aFileName)
|
||||
{
|
||||
if (aReplace) {
|
||||
// Find out what the signons file was called, this is stored in a pref
|
||||
// in Seamonkey.
|
||||
nsCOMPtr<nsIPrefService> psvc(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
|
||||
if (psvc) {
|
||||
nsCOMPtr<nsIPrefBranch> branch(do_QueryInterface(psvc));
|
||||
|
||||
if (NS_SUCCEEDED(branch->GetCharPref("signon.SignonFileName",
|
||||
aFileName)))
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
return LocateWalletFile("s", aFileName);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsNetscapeProfileMigratorBase::ImportNetscapeCookies(nsIFile* aCookiesFile)
|
||||
{
|
||||
@ -954,9 +934,23 @@ nsNetscapeProfileMigratorBase::ImportNetscapeCookies(nsIFile* aCookiesFile)
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsNetscapeProfileMigratorBase::LocateWalletFile(const char* aExtension,
|
||||
char** aResult)
|
||||
nsNetscapeProfileMigratorBase::GetSignonFileName(PRBool aReplace,
|
||||
char** aFileName)
|
||||
{
|
||||
if (aReplace) {
|
||||
// Find out what the signons file was called, this is stored in a pref
|
||||
// in Seamonkey.
|
||||
nsCOMPtr<nsIPrefService> psvc(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
|
||||
if (psvc) {
|
||||
nsCOMPtr<nsIPrefBranch> branch(do_QueryInterface(psvc));
|
||||
|
||||
if (NS_SUCCEEDED(branch->GetCharPref("signon.SignonFileName",
|
||||
aFileName)))
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsISimpleEnumerator> entries;
|
||||
nsresult rv = mSourceProfile->GetDirectoryEntries(getter_AddRefs(entries));
|
||||
if (NS_FAILED(rv))
|
||||
@ -986,13 +980,13 @@ nsNetscapeProfileMigratorBase::LocateWalletFile(const char* aExtension,
|
||||
nsCAutoString extn;
|
||||
url->GetFileExtension(extn);
|
||||
|
||||
if (extn.Equals(aExtension, CaseInsensitiveCompare)) {
|
||||
if (extn.Equals("s", CaseInsensitiveCompare)) {
|
||||
url->GetFileName(fileName);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
*aResult = ToNewCString(fileName);
|
||||
*aFileName = ToNewCString(fileName);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -160,7 +160,6 @@ protected:
|
||||
nsresult CopyUserSheet(const char* aFileName);
|
||||
nsresult GetSignonFileName(PRBool aReplace, char** aFileName);
|
||||
nsresult ImportNetscapeCookies(nsIFile* aCookiesFile);
|
||||
nsresult LocateWalletFile(const char* aExtension, char** aResult);
|
||||
|
||||
// Browser Import Functions
|
||||
nsresult CopyBookmarks(PRBool aReplace);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user