Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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. | |
| 4 | |
| 5 #ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_PARAMS_H_ | |
| 6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_PARAMS_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 #include <string> | |
| 10 | |
| 11 #include "net/base/network_change_notifier.h" | |
| 12 #include "net/nqe/effective_connection_type.h" | |
| 13 #include "net/nqe/network_quality.h" | |
| 14 | |
| 15 namespace net { | |
| 16 | |
| 17 namespace nqe { | |
| 18 | |
| 19 namespace internal { | |
| 20 | |
| 21 // Returns the algorithm that should be used for computing effective connection | |
| 22 // type based on field trial params. Returns an empty string if a valid | |
| 23 // algorithm paramter is not present in the field trial params. | |
| 24 std::string GetEffectiveConnectionTypeAlgorithm( | |
| 25 const std::map<std::string, std::string>& variation_params); | |
| 26 | |
| 27 // 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.
| |
| 28 // |variation_params| is the map containing all field trial parameters | |
| 29 // related to NetworkQualityEstimator field trial. | |
|
bengr
2016/10/27 16:12:30
to -> to the
tbansal1
2016/10/28 20:26:04
Done.
| |
| 30 double GetWeightMultiplierPerSecond( | |
| 31 const std::map<std::string, std::string>& variation_params); | |
| 32 | |
| 33 // Returns a descriptive name corresponding to |connection_type|. | |
| 34 const char* GetNameForConnectionType( | |
| 35 net::NetworkChangeNotifier::ConnectionType connection_type); | |
| 36 | |
| 37 // 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.
| |
| 38 // |default_observations|. | |
| 39 void ObtainDefaultObservations( | |
| 40 const std::map<std::string, std::string>& variation_params, | |
| 41 nqe::internal::NetworkQuality default_observations[]); | |
| 42 | |
| 43 // Parses the variation paramaters and sets the thresholds for different | |
| 44 // effective connection types in |connection_thresholds|. | |
| 45 void ObtainEffectiveConnectionTypeModelParams( | |
| 46 const std::map<std::string, std::string>& variation_params, | |
| 47 nqe::internal::NetworkQuality connection_thresholds[]); | |
| 48 | |
| 49 // 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.
| |
| 50 double correlation_uma_logging_probability( | |
| 51 const std::map<std::string, std::string>& variation_params); | |
| 52 | |
| 53 // 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.
| |
| 54 // parameters. | |
| 55 bool forced_effective_connection_type_set( | |
| 56 const std::map<std::string, std::string>& variation_params); | |
| 57 | |
| 58 // 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.
| |
| 59 EffectiveConnectionType forced_effective_connection_type( | |
| 60 const std::map<std::string, std::string>& variation_params); | |
| 61 | |
| 62 } // namespace internal | |
| 63 | |
| 64 } // namespace nqe | |
| 65 | |
| 66 } // namespace net | |
| 67 | |
| 68 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_PARAMS_H_ | |
| OLD | NEW |