Bug 1892041 - Part 1: Update test262 features. r=spidermonkey-reviewers,dminor
[gecko.git] / dom / base / UseCounterMetrics.h
blob65d4234d1eeb7f085d28ae4e8f86348f922e2641
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_
9 #include "stdint.h"
11 namespace mozilla {
12 enum UseCounter : int16_t;
13 enum class UseCounterWorker : int16_t;
15 namespace dom {
16 enum WorkerKind : uint8_t;
18 /**
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);
27 /**
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,
35 WorkerKind aKind);
37 } // namespace dom
38 } // namespace mozilla
40 #endif // UseCounterMetrics_h_