зеркало из https://github.com/mozilla/gecko-dev.git
Bug 26622 nsAutoString use as member variables should be reviewed (mailnews patch). Original Patch by Mikael Parknert <mikael@parknert.se>, updated by me. r=neil.parkwaycc.co.uk,sr=bienvenu
This commit is contained in:
Родитель
28bd733421
Коммит
6389b93dbf
|
@ -143,8 +143,8 @@ private:
|
|||
char *mInboxURI;
|
||||
char *mEmail;
|
||||
|
||||
nsAutoString mAppName;
|
||||
nsAutoString mEmailPrefix;
|
||||
nsString mAppName;
|
||||
nsString mEmailPrefix;
|
||||
nsCString mShellDllPath;
|
||||
|
||||
#ifdef MOZ_THUNDERBIRD
|
||||
|
|
|
@ -87,7 +87,7 @@ private:
|
|||
nsCOMPtr<nsISmtpServer> mDefaultSmtpServer;
|
||||
nsCOMPtr<nsISmtpServer> mSessionDefaultServer;
|
||||
|
||||
nsCAutoString mServerKeyList;
|
||||
nsCString mServerKeyList;
|
||||
|
||||
PRBool mSmtpServersLoaded;
|
||||
};
|
||||
|
|
|
@ -341,7 +341,7 @@ private:
|
|||
PRUint32 m_allocatedSize; // allocated size
|
||||
PRUint32 m_totalDataSize; // total data size
|
||||
PRUint32 m_curReadIndex; // current read index
|
||||
nsCAutoString m_trashFolderName;
|
||||
nsCString m_trashFolderName;
|
||||
|
||||
// Ouput stream for writing commands to the socket
|
||||
nsCOMPtr<nsISocketTransport> m_transport;
|
||||
|
|
|
@ -84,7 +84,7 @@ const char * nsMapiRegistryUtils::thisApplication()
|
|||
return m_thisApp.get() ;
|
||||
}
|
||||
|
||||
void nsMapiRegistryUtils::getVarValue(const PRUnichar * varName, nsAutoString & result)
|
||||
void nsMapiRegistryUtils::getVarValue(const PRUnichar * varName, nsXPIDLString & result)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(
|
||||
|
@ -95,12 +95,9 @@ void nsMapiRegistryUtils::getVarValue(const PRUnichar * varName, nsAutoString &
|
|||
"chrome://branding/locale/brand.properties",
|
||||
getter_AddRefs(brandBundle));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsXPIDLString value;
|
||||
rv = brandBundle->GetStringFromName(
|
||||
brandBundle->GetStringFromName(
|
||||
varName,
|
||||
getter_Copies(value));
|
||||
if (NS_SUCCEEDED(rv))
|
||||
result = value;
|
||||
getter_Copies(result));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -788,7 +785,7 @@ nsresult nsMapiRegistryUtils::registerMailApp(PRBool aForceRegistration)
|
|||
appKeyName.Assign(keyName);
|
||||
appKeyName.AppendLiteral("\\shell\\properties");
|
||||
|
||||
nsAutoString brandShortName;
|
||||
nsXPIDLString brandShortName;
|
||||
getVarValue(NS_LITERAL_STRING("brandShortName").get(), brandShortName);
|
||||
|
||||
const PRUnichar* brandNameStrings[] = { brandShortName.get() };
|
||||
|
|
|
@ -55,15 +55,14 @@
|
|||
class nsMapiRegistryUtils
|
||||
{
|
||||
private :
|
||||
nsCAutoString m_thisApp ;
|
||||
nsAutoString m_brand ;
|
||||
nsAutoString m_vendor ;
|
||||
nsAutoString m_versionNo ;
|
||||
nsCString m_thisApp;
|
||||
nsXPIDLString m_brand;
|
||||
nsXPIDLString m_vendor;
|
||||
|
||||
nsCOMPtr<nsIStringBundle> m_mapiStringBundle ;
|
||||
|
||||
// sets result to the value of varName (as defined in brand.properties)
|
||||
void getVarValue(const PRUnichar * varName, nsAutoString & result);
|
||||
void getVarValue(const PRUnichar * varName, nsXPIDLString & result);
|
||||
|
||||
// verifyRestrictedAccess - Returns PR_TRUE if this user only has restricted access
|
||||
// to the registry keys we need to modify. Consumers should call the public method
|
||||
|
|
Загрузка…
Ссылка в новой задаче