Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: net/nqe/network_quality_estimator_params.h

Issue 2421063002: NQE: Separate out params to a different file (Closed)
Patch Set: Addressed bengr comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/nqe/network_quality_estimator.cc ('k') | net/nqe/network_quality_estimator_params.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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, which represents the
28 // factor by which the weight of an observation reduces every second.
29 // |variation_params| is the map containing all field trial parameters
30 // related to the NetworkQualityualityEstimator field trial.
31 double GetWeightMultiplierPerSecond(
32 const std::map<std::string, std::string>& variation_params);
33
34 // Returns a descriptive name corresponding to |connection_type|.
35 const char* GetNameForConnectionType(
36 net::NetworkChangeNotifier::ConnectionType connection_type);
37
38 // Sets the default observation for different connection types in
39 // |default_observations|. The default observations are different for different
40 // connection types (e.g., 2G, 3G, 4G, WiFi). The default observations may be
41 // used to determine the network quality in absence of any other information.
42 void ObtainDefaultObservations(
43 const std::map<std::string, std::string>& variation_params,
44 nqe::internal::NetworkQuality default_observations[]);
45
46 // Parses the variation paramaters and sets the thresholds for different
47 // effective connection types in |connection_thresholds|.
48 void ObtainEffectiveConnectionTypeModelParams(
49 const std::map<std::string, std::string>& variation_params,
50 nqe::internal::NetworkQuality connection_thresholds[]);
51
52 // Returns the fraction of URL requests that should record the correlation UMA.
53 double correlation_uma_logging_probability(
54 const std::map<std::string, std::string>& variation_params);
55
56 // Returns true if the effective connection type has been determined via
57 // variation parameters.
58 bool forced_effective_connection_type_set(
59 const std::map<std::string, std::string>& variation_params);
60
61 // Returns the effective connection type that was configured by variation
62 // parameters.
63 EffectiveConnectionType forced_effective_connection_type(
64 const std::map<std::string, std::string>& variation_params);
65
66 } // namespace internal
67
68 } // namespace nqe
69
70 } // namespace net
71
72 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_PARAMS_H_
OLDNEW
« no previous file with comments | « net/nqe/network_quality_estimator.cc ('k') | net/nqe/network_quality_estimator_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698