зеркало из https://github.com/mozilla/pjs.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:
Родитель
cd6804b09f
Коммит
e366d84324
|
@ -143,8 +143,8 @@ private:
|
||||||
char *mInboxURI;
|
char *mInboxURI;
|
||||||
char *mEmail;
|
char *mEmail;
|
||||||
|
|
||||||
nsAutoString mAppName;
|
nsString mAppName;
|
||||||
nsAutoString mEmailPrefix;
|
nsString mEmailPrefix;
|
||||||
nsCString mShellDllPath;
|
nsCString mShellDllPath;
|
||||||
|
|
||||||
#ifdef MOZ_THUNDERBIRD
|
#ifdef MOZ_THUNDERBIRD
|
||||||
|
|
|
@ -87,7 +87,7 @@ private:
|
||||||
nsCOMPtr<nsISmtpServer> mDefaultSmtpServer;
|
nsCOMPtr<nsISmtpServer> mDefaultSmtpServer;
|
||||||
nsCOMPtr<nsISmtpServer> mSessionDefaultServer;
|
nsCOMPtr<nsISmtpServer> mSessionDefaultServer;
|
||||||
|
|
||||||
nsCAutoString mServerKeyList;
|
nsCString mServerKeyList;
|
||||||
|
|
||||||
PRBool mSmtpServersLoaded;
|
PRBool mSmtpServersLoaded;
|
||||||
};
|
};
|
||||||
|
|
|
@ -341,7 +341,7 @@ private:
|
||||||
PRUint32 m_allocatedSize; // allocated size
|
PRUint32 m_allocatedSize; // allocated size
|
||||||
PRUint32 m_totalDataSize; // total data size
|
PRUint32 m_totalDataSize; // total data size
|
||||||
PRUint32 m_curReadIndex; // current read index
|
PRUint32 m_curReadIndex; // current read index
|
||||||
nsCAutoString m_trashFolderName;
|
nsCString m_trashFolderName;
|
||||||
|
|
||||||
// Ouput stream for writing commands to the socket
|
// Ouput stream for writing commands to the socket
|
||||||
nsCOMPtr<nsISocketTransport> m_transport;
|
nsCOMPtr<nsISocketTransport> m_transport;
|
||||||
|
|
|
@ -84,7 +84,7 @@ const char * nsMapiRegistryUtils::thisApplication()
|
||||||
return m_thisApp.get() ;
|
return m_thisApp.get() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsMapiRegistryUtils::getVarValue(const PRUnichar * varName, nsAutoString & result)
|
void nsMapiRegistryUtils::getVarValue(const PRUnichar * varName, nsXPIDLString & result)
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(
|
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(
|
||||||
|
@ -95,12 +95,9 @@ void nsMapiRegistryUtils::getVarValue(const PRUnichar * varName, nsAutoString &
|
||||||
"chrome://branding/locale/brand.properties",
|
"chrome://branding/locale/brand.properties",
|
||||||
getter_AddRefs(brandBundle));
|
getter_AddRefs(brandBundle));
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
nsXPIDLString value;
|
brandBundle->GetStringFromName(
|
||||||
rv = brandBundle->GetStringFromName(
|
|
||||||
varName,
|
varName,
|
||||||
getter_Copies(value));
|
getter_Copies(result));
|
||||||
if (NS_SUCCEEDED(rv))
|
|
||||||
result = value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -788,7 +785,7 @@ nsresult nsMapiRegistryUtils::registerMailApp(PRBool aForceRegistration)
|
||||||
appKeyName.Assign(keyName);
|
appKeyName.Assign(keyName);
|
||||||
appKeyName.AppendLiteral("\\shell\\properties");
|
appKeyName.AppendLiteral("\\shell\\properties");
|
||||||
|
|
||||||
nsAutoString brandShortName;
|
nsXPIDLString brandShortName;
|
||||||
getVarValue(NS_LITERAL_STRING("brandShortName").get(), brandShortName);
|
getVarValue(NS_LITERAL_STRING("brandShortName").get(), brandShortName);
|
||||||
|
|
||||||
const PRUnichar* brandNameStrings[] = { brandShortName.get() };
|
const PRUnichar* brandNameStrings[] = { brandShortName.get() };
|
||||||
|
|
|
@ -55,15 +55,14 @@
|
||||||
class nsMapiRegistryUtils
|
class nsMapiRegistryUtils
|
||||||
{
|
{
|
||||||
private :
|
private :
|
||||||
nsCAutoString m_thisApp ;
|
nsCString m_thisApp;
|
||||||
nsAutoString m_brand ;
|
nsXPIDLString m_brand;
|
||||||
nsAutoString m_vendor ;
|
nsXPIDLString m_vendor;
|
||||||
nsAutoString m_versionNo ;
|
|
||||||
|
|
||||||
nsCOMPtr<nsIStringBundle> m_mapiStringBundle ;
|
nsCOMPtr<nsIStringBundle> m_mapiStringBundle ;
|
||||||
|
|
||||||
// sets result to the value of varName (as defined in brand.properties)
|
// 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
|
// 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
|
// to the registry keys we need to modify. Consumers should call the public method
|
||||||
|
|
Загрузка…
Ссылка в новой задаче