OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/proximity_auth/metrics.h" | 5 #include "components/proximity_auth/metrics.h" |
6 | 6 |
| 7 #include "base/logging.h" |
7 #include "base/md5.h" | 8 #include "base/md5.h" |
8 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
9 #include "base/metrics/sparse_histogram.h" | 10 #include "base/metrics/sparse_histogram.h" |
10 #include "base/sys_byteorder.h" | 11 #include "base/sys_byteorder.h" |
11 | 12 |
12 namespace proximity_auth { | 13 namespace proximity_auth { |
13 namespace metrics { | 14 namespace metrics { |
14 | 15 |
15 namespace { | 16 namespace { |
16 | 17 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 base::TimeDelta time_since_last_zero_rssi) { | 63 base::TimeDelta time_since_last_zero_rssi) { |
63 UMA_HISTOGRAM_TIMES("EasyUnlock.AuthProximity.TimeSinceLastZeroRssi", | 64 UMA_HISTOGRAM_TIMES("EasyUnlock.AuthProximity.TimeSinceLastZeroRssi", |
64 time_since_last_zero_rssi); | 65 time_since_last_zero_rssi); |
65 } | 66 } |
66 | 67 |
67 void RecordAuthProximityRemoteDeviceModelHash(const std::string& device_model) { | 68 void RecordAuthProximityRemoteDeviceModelHash(const std::string& device_model) { |
68 UMA_HISTOGRAM_SPARSE_SLOWLY("EasyUnlock.AuthProximity.RemoteDeviceModelHash", | 69 UMA_HISTOGRAM_SPARSE_SLOWLY("EasyUnlock.AuthProximity.RemoteDeviceModelHash", |
69 HashDeviceModelName(device_model)); | 70 HashDeviceModelName(device_model)); |
70 } | 71 } |
71 | 72 |
| 73 void RecordRemoteSecuritySettingsState(RemoteSecuritySettingsState state) { |
| 74 DCHECK(state < RemoteSecuritySettingsState::COUNT); |
| 75 UMA_HISTOGRAM_ENUMERATION( |
| 76 "EasyUnlock.RemoteLockScreenState", static_cast<int>(state), |
| 77 static_cast<int>(RemoteSecuritySettingsState::COUNT)); |
| 78 } |
| 79 |
72 } // namespace metrics | 80 } // namespace metrics |
73 } // namespace proximity_auth | 81 } // namespace proximity_auth |
OLD | NEW |