Chromium Code Reviews| Index: net/nqe/network_quality_estimator_params.h |
| diff --git a/net/nqe/network_quality_estimator_params.h b/net/nqe/network_quality_estimator_params.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3f84e47931d6cec43623a5154f881d09949757b3 |
| --- /dev/null |
| +++ b/net/nqe/network_quality_estimator_params.h |
| @@ -0,0 +1,68 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_PARAMS_H_ |
| +#define NET_NQE_NETWORK_QUALITY_ESTIMATOR_PARAMS_H_ |
| + |
| +#include <map> |
| +#include <string> |
| + |
| +#include "net/base/network_change_notifier.h" |
| +#include "net/nqe/effective_connection_type.h" |
| +#include "net/nqe/network_quality.h" |
| + |
| +namespace net { |
| + |
| +namespace nqe { |
| + |
| +namespace internal { |
| + |
| +// Returns the algorithm that should be used for computing effective connection |
| +// type based on field trial params. Returns an empty string if a valid |
| +// algorithm paramter is not present in the field trial params. |
| +std::string GetEffectiveConnectionTypeAlgorithm( |
| + const std::map<std::string, std::string>& variation_params); |
| + |
| +// Computes and returns the weight multiplier per second. |
|
bengr
2016/10/27 16:12:30
You should define what a "weight multiplier per se
tbansal1
2016/10/28 20:26:04
Done.
|
| +// |variation_params| is the map containing all field trial parameters |
| +// related to NetworkQualityEstimator field trial. |
|
bengr
2016/10/27 16:12:30
to -> to the
tbansal1
2016/10/28 20:26:04
Done.
|
| +double GetWeightMultiplierPerSecond( |
| + const std::map<std::string, std::string>& variation_params); |
| + |
| +// Returns a descriptive name corresponding to |connection_type|. |
| +const char* GetNameForConnectionType( |
| + net::NetworkChangeNotifier::ConnectionType connection_type); |
| + |
| +// Sets the default observation for different connection types in |
|
bengr
2016/10/27 16:12:30
Define what a "default observation" is.
tbansal1
2016/10/28 20:26:04
Done.
|
| +// |default_observations|. |
| +void ObtainDefaultObservations( |
| + const std::map<std::string, std::string>& variation_params, |
| + nqe::internal::NetworkQuality default_observations[]); |
| + |
| +// Parses the variation paramaters and sets the thresholds for different |
| +// effective connection types in |connection_thresholds|. |
| +void ObtainEffectiveConnectionTypeModelParams( |
| + const std::map<std::string, std::string>& variation_params, |
| + nqe::internal::NetworkQuality connection_thresholds[]); |
| + |
| +// Returns the probability at which the correlation UMA should be recorded. |
|
bengr
2016/10/27 16:12:30
This could be worded better. Maybe something like:
tbansal1
2016/10/28 20:26:04
Done.
|
| +double correlation_uma_logging_probability( |
| + const std::map<std::string, std::string>& variation_params); |
| + |
| +// Returns true if effective connection type value has been forced via variation |
|
bengr
2016/10/27 16:12:29
if -> if the
type value -> type
forced -> determin
tbansal1
2016/10/28 20:26:04
Done.
|
| +// parameters. |
| +bool forced_effective_connection_type_set( |
| + const std::map<std::string, std::string>& variation_params); |
| + |
| +// Returns the effective connection type set via variation parameters. |
|
bengr
2016/10/27 16:12:30
type set via -> type that was configured by
tbansal1
2016/10/28 20:26:04
Done.
|
| +EffectiveConnectionType forced_effective_connection_type( |
| + const std::map<std::string, std::string>& variation_params); |
| + |
| +} // namespace internal |
| + |
| +} // namespace nqe |
| + |
| +} // namespace net |
| + |
| +#endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_PARAMS_H_ |