blob: 9cad48c1acc29be8ee653d0923434112c66421e4 [file] [log] [blame]
Ben Chancb3563e2013-09-12 23:20:34 -07001// Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "mist/metrics.h"
6
7#include <base/logging.h>
8
9namespace mist {
10
11namespace {
12
13enum SwitchResult {
14 kSwitchResultSuccess,
15 kSwitchResultFailure,
16 kSwitchResultMaxValue
17};
18
19} // namespace
20
Joel Kitching21beaba2019-03-11 15:47:30 +080021Metrics::Metrics() {}
Ben Chancb3563e2013-09-12 23:20:34 -070022
Ben Chancb3563e2013-09-12 23:20:34 -070023void Metrics::RecordSwitchResult(bool success) {
24 if (!metrics_library_.SendEnumToUMA(
25 "Mist.SwitchResult",
26 success ? kSwitchResultSuccess : kSwitchResultFailure,
27 kSwitchResultMaxValue))
28 LOG(WARNING) << "Could not send switch result sample to UMA.";
29}
30
31} // namespace mist