1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef UseCounterMetrics_h_
7 #define UseCounterMetrics_h_
12 enum UseCounter
: int16_t;
13 enum class UseCounterWorker
: int16_t;
16 enum WorkerKind
: uint8_t;
19 * Increments the metric associated with the specific use counter.
21 * @param aUseCounter - The use counter for the feature that was used.
22 * @param aIsPage - Whether we should record to the page or document metric.
23 * @returns The name of the metric that was incremented, or "".
25 const char* IncrementUseCounter(UseCounter aUseCounter
, bool aIsPage
);
28 * Increments the metric associated with the specific worker use counter.
30 * @param aUseCounter - The use counter for the feature that was used.
31 * @param aKind - The kind of worker that triggered the use counter.
32 * @returns The name of the metric that was incremented, or "".
34 const char* IncrementWorkerUseCounter(UseCounterWorker aUseCounter
,
38 } // namespace mozilla
40 #endif // UseCounterMetrics_h_