mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 657297 part 1 - Expose a function to add telemetry samples in XRE. r=tglek,sr=bsmedberg
This commit is contained in:
parent
69a2c1e7b4
commit
784abb0156
@ -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);
|
||||
}
|
||||
|
@ -569,4 +569,7 @@ XRE_API(void,
|
||||
XRE_SetupDllBlocklist, ())
|
||||
#endif
|
||||
|
||||
XRE_API(void,
|
||||
XRE_TelemetryAccumulate, (int aID, PRUint32 aSample))
|
||||
|
||||
#endif // _nsXULAppAPI_h__
|
||||
|
Loading…
Reference in New Issue
Block a user