author | Ted Mielczarek <ted@mielczarek.org> |
Wed, 19 Feb 2014 09:20:02 -0500 | |
changeset 170548 | a34e6d5519efea358caaf9daf8555b04443539eb |
parent 170547 | 758c586cde7ab578857d1ec8ee5ca8ec74fdbc56 |
child 170549 | c3b332620bb61c4d30eb53175e5149c5ac02cddb |
push id | 26291 |
push user | kwierso@gmail.com |
push date | Wed, 26 Feb 2014 04:10:11 +0000 |
treeherder | mozilla-central@626d99c084cb [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bsmedberg |
bugs | 972555 |
milestone | 30.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
toolkit/xre/nsAppRunner.cpp | file | annotate | diff | comparison | revisions | |
xpcom/system/nsIXULRuntime.idl | file | annotate | diff | comparison | revisions |
--- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -861,16 +861,52 @@ nsXULAppInfo::GetLastRunCrashID(nsAStrin #ifdef MOZ_CRASHREPORTER CrashReporter::GetLastRunCrashID(aLastRunCrashID); return NS_OK; #else return NS_ERROR_NOT_IMPLEMENTED; #endif } +NS_IMETHODIMP +nsXULAppInfo::GetIsReleaseBuild(bool* aResult) +{ +#ifdef RELEASE_BUILD + *aResult = true; +#else + *aResult = false; +#endif + return NS_OK; +} + +NS_IMETHODIMP +nsXULAppInfo::GetIsOfficialBranding(bool* aResult) +{ +#ifdef MOZ_OFFICIAL_BRANDING + *aResult = true; +#else + *aResult = false; +#endif + return NS_OK; +} + +NS_IMETHODIMP +nsXULAppInfo::GetDefaultUpdateChannel(nsACString& aResult) +{ + aResult.AssignLiteral(NS_STRINGIFY(MOZ_UPDATE_CHANNEL)); + return NS_OK; +} + +NS_IMETHODIMP +nsXULAppInfo::GetDistributionID(nsACString& aResult) +{ + aResult.AssignLiteral(MOZ_DISTRIBUTION_ID); + 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. typedef enum { VistaTokenElevationTypeDefault = 1, VistaTokenElevationTypeFull, VistaTokenElevationTypeLimited
--- a/xpcom/system/nsIXULRuntime.idl +++ b/xpcom/system/nsIXULRuntime.idl @@ -15,17 +15,17 @@ bool BrowserTabsRemote(); /** * Provides information about the XUL runtime. * @status UNSTABLE - This interface is not frozen and will probably change in * future releases. If you need this functionality to be * stable/frozen, please contact Benjamin Smedberg. */ -[scriptable, uuid(33bd1630-611e-11e3-949a-0800200c9a66)] +[scriptable, uuid(ef6df588-f0bf-4e38-949e-9de838c228ea)] interface nsIXULRuntime : nsISupports { /** * Whether the application was launched in safe mode. */ readonly attribute boolean inSafeMode; /** @@ -105,9 +105,29 @@ interface nsIXULRuntime : nsISupports */ readonly attribute PRTime replacedLockTime; /** * Local ID of the minidump generated when the process crashed * on the previous run. Can be passed directly to CrashSubmit.submit. */ readonly attribute DOMString lastRunCrashID; + + /** + * True if this is a RELEASE_BUILD. + */ + readonly attribute boolean isReleaseBuild; + + /** + * True if this build uses official branding (MOZ_OFFICIAL_BRANDING). + */ + readonly attribute boolean isOfficialBranding; + + /** + * The default update channel (MOZ_UPDATE_CHANNEL). + */ + readonly attribute AUTF8String defaultUpdateChannel; + + /** + * The distribution ID for this build (MOZ_DISTRIBUTION_ID). + */ + readonly attribute AUTF8String distributionID; };