Bug 1073536 - Allow checking if MOZILLA_OFFICIAL is set via nsIXULRuntime. r=ted

This commit is contained in:
Georg Fritzsche 2014-10-10 17:21:17 +02:00
Родитель b7a6c9b0ba
Коммит e65176ab6b
2 изменённых файлов: 17 добавлений и 1 удалений

Просмотреть файл

@ -973,6 +973,17 @@ nsXULAppInfo::GetDistributionID(nsACString& aResult)
return NS_OK;
}
NS_IMETHODIMP
nsXULAppInfo::GetIsOfficial(bool* aResult)
{
#ifdef MOZILLA_OFFICIAL
*aResult = true;
#else
*aResult = false;
#endif
return NS_OK;
}
#ifdef XP_WIN
// Matches the enum in WinNT.h for the Vista SDK but renamed so that we can
// safely build with the Vista SDK and without it.

Просмотреть файл

@ -23,7 +23,7 @@ bool BrowserTabsRemoteAutostart();
* stable/frozen, please contact Benjamin Smedberg.
*/
[scriptable, uuid(588831D6-7576-4CEA-B368-3AAB76CD9FCC)]
[scriptable, uuid(15b0e6cf-83da-4672-814e-cfa0b06ba31b)]
interface nsIXULRuntime : nsISupports
{
/**
@ -151,4 +151,9 @@ interface nsIXULRuntime : nsISupports
* The distribution ID for this build (MOZ_DISTRIBUTION_ID).
*/
readonly attribute AUTF8String distributionID;
/**
* True if this is an official build (MOZILLA_OFFICIAL).
*/
readonly attribute boolean isOfficial;
};