Extension syncing: Introduce a NeedsSync pref
[chromium-blink-merge.git] / components / proximity_auth / metrics.h
blob5a0e20a7c3764cf59df5c7fe4202426848422647
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_PROXIMITY_AUTH_METRICS_H
6 #define COMPONENTS_PROXIMITY_AUTH_METRICS_H
8 #include "base/time/time.h"
10 namespace proximity_auth {
11 namespace metrics {
13 extern const char kUnknownDeviceModel[];
14 extern const int kUnknownProximityValue;
16 // Records the current |rolling_rssi| reading, upon a successful auth attempt.
17 // |rolling_rssi| should be set to |kUnknownProximityValue| if no RSSI readings
18 // are available.
19 void RecordAuthProximityRollingRssi(int rolling_rssi);
21 // Records the difference between the transmit power and maximum transmit power,
22 // upon a successful auth attempt. |transmit_power_delta| should be set to
23 // |kUnknownProximityValue| if no Tx power readings are available.
24 void RecordAuthProximityTransmitPowerDelta(int transmit_power_delta);
26 // Records the time elapsed since the last zero RSSI value was read, upon a
27 // successful auth attempt.
28 void RecordAuthProximityTimeSinceLastZeroRssi(
29 base::TimeDelta time_since_last_zero_rssi);
31 // Records the phone model used for a successful auth attempt. The model is
32 // recorded as a 32-bit hash due to the limits of UMA. |device_model| should be
33 // set to |kUnknownDeviceModel| if the device model could not be read.
34 void RecordAuthProximityRemoteDeviceModelHash(const std::string& device_model);
36 } // namespace metrics
37 } // namespace proximity_auth
39 #endif // COMPONENTS_PROXIMITY_AUTH_METRICS_H