Bug 657297 part 1 - Expose a function to add telemetry samples in XRE. r=tglek,sr=bsmedberg

This commit is contained in:
Mike Hommey 2011-05-22 08:23:20 +02:00
parent 69a2c1e7b4
commit 784abb0156
2 changed files with 14 additions and 0 deletions

View File

@ -50,6 +50,7 @@
#include "nsTHashtable.h"
#include "nsHashKeys.h"
#include "nsBaseHashtable.h"
#include "nsXULAppAPI.h"
namespace {
@ -359,3 +360,13 @@ Accumulate(ID aHistogram, PRUint32 aSample)
} // namespace mozilla
NSMODULE_DEFN(nsTelemetryModule) = &kTelemetryModule;
/**
* The XRE_TelemetryAdd function is to be used by embedding applications
* that can't use mozilla::Telemetry::Accumulate() directly.
*/
void
XRE_TelemetryAccumulate(int aID, PRUint32 aSample)
{
mozilla::Telemetry::Accumulate((mozilla::Telemetry::ID) aID, aSample);
}

View File

@ -569,4 +569,7 @@ XRE_API(void,
XRE_SetupDllBlocklist, ())
#endif
XRE_API(void,
XRE_TelemetryAccumulate, (int aID, PRUint32 aSample))
#endif // _nsXULAppAPI_h__