Index: net/nqe/network_quality_observation.h |
diff --git a/net/nqe/network_quality_observation.h b/net/nqe/network_quality_observation.h |
index 91d163303ba4802c00c1b66cbda4a422aee3d383..f6b1cb88e06ccd15bab2eea35aff221c30d37991 100644 |
--- a/net/nqe/network_quality_observation.h |
+++ b/net/nqe/network_quality_observation.h |
@@ -5,10 +5,13 @@ |
#ifndef NET_NQE_NETWORK_QUALITY_OBSERVATION_H_ |
#define NET_NQE_NETWORK_QUALITY_OBSERVATION_H_ |
+#include <stdint.h> |
+ |
#include <vector> |
#include "base/gtest_prod_util.h" |
#include "base/macros.h" |
+#include "base/optional.h" |
#include "base/time/time.h" |
#include "net/base/net_export.h" |
#include "net/nqe/network_quality_observation_source.h" |
@@ -28,11 +31,11 @@ template <typename ValueType> |
struct NET_EXPORT_PRIVATE Observation { |
Observation(const ValueType& value, |
base::TimeTicks timestamp, |
- int32_t signal_strength_dbm, |
+ const base::Optional<int32_t>& signal_strength, |
NetworkQualityObservationSource source) |
: value(value), |
timestamp(timestamp), |
- signal_strength_dbm(signal_strength_dbm), |
+ signal_strength(signal_strength), |
source(source) { |
DCHECK(!timestamp.is_null()); |
} |
@@ -44,9 +47,8 @@ struct NET_EXPORT_PRIVATE Observation { |
// Time when the observation was taken. |
const base::TimeTicks timestamp; |
- // Signal strength (in dBm) when the observation was taken. Set to INT32_MIN |
- // if the signal strength is unavailable. |
- const int32_t signal_strength_dbm; |
+ // Signal strength when the observation was taken. |
+ const base::Optional<int32_t> signal_strength; |
// The source of the observation. |
const NetworkQualityObservationSource source; |