bug 682247 - telemetry for deprocated IAccessibleTable interface r=surkov

This commit is contained in:
Trevor Saunders 2011-09-15 23:39:15 -04:00
parent 2b5a1b6727
commit bc0274e8c3
3 changed files with 11 additions and 0 deletions

View File

@ -55,6 +55,12 @@ namespace statistics {
inline void ISimpleDOMUsed()
{ Telemetry::Accumulate(Telemetry::ISIMPLE_DOM_USAGE, 1); }
/**
* Report that IAccessibleTable has been used.
*/
inline void IAccessibleTableUsed()
{ Telemetry::Accumulate(Telemetry::IACCESSIBLE_TABLE_USAGE, 1); }
} // namespace statistics
} // namespace a11y
} // namespace mozilla

View File

@ -49,10 +49,13 @@
#include "nsIWinAccessNode.h"
#include "nsAccessNodeWrap.h"
#include "nsWinUtils.h"
#include "Statistics.h"
#include "nsCOMPtr.h"
#include "nsString.h"
using namespace mozilla::a11y;
#define CANT_QUERY_ASSERTION_MSG \
"Subclass of CAccessibleTable doesn't implement nsIAccessibleTable"\
@ -64,6 +67,7 @@ CAccessibleTable::QueryInterface(REFIID iid, void** ppv)
*ppv = NULL;
if (IID_IAccessibleTable == iid) {
statistics::IAccessibleTableUsed();
*ppv = static_cast<IAccessibleTable*>(this);
(reinterpret_cast<IUnknown*>(*ppv))->AddRef();
return S_OK;

View File

@ -54,6 +54,7 @@
*/
HISTOGRAM(A11Y_INSTANTIATED, 0, 1, 2, BOOLEAN, "has accessibility support been instantiated")
HISTOGRAM(ISIMPLE_DOM_USAGE, 0, 1, 2, BOOLEAN, "have the ISimpleDOM* accessibility interfaces been used")
HISTOGRAM(IACCESSIBLE_TABLE_USAGE, 0, 1, 2, BOOLEAN, "has the IAccessibleTable accessibility interface been used")
HISTOGRAM(CYCLE_COLLECTOR, 1, 10000, 50, EXPONENTIAL, "Time spent on one cycle collection (ms)")
HISTOGRAM(CYCLE_COLLECTOR_VISITED_REF_COUNTED, 1, 300000, 50, EXPONENTIAL, "Number of ref counted objects visited by the cycle collector")