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

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

Issue 2113363002: NQE: Add Transport RTT based GetECT algorithm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 5 months 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 | « no previous file | net/nqe/network_quality_estimator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_NQE_NETWORK_QUALITY_H_ 5 #ifndef NET_NQE_NETWORK_QUALITY_H_
6 #define NET_NQE_NETWORK_QUALITY_H_ 6 #define NET_NQE_NETWORK_QUALITY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 28 matching lines...) Expand all
39 const base::TimeDelta& transport_rtt, 39 const base::TimeDelta& transport_rtt,
40 int32_t downstream_throughput_kbps); 40 int32_t downstream_throughput_kbps);
41 NetworkQuality(const NetworkQuality& other); 41 NetworkQuality(const NetworkQuality& other);
42 ~NetworkQuality(); 42 ~NetworkQuality();
43 43
44 NetworkQuality& operator=(const NetworkQuality& other); 44 NetworkQuality& operator=(const NetworkQuality& other);
45 45
46 // Returns the estimate of the round trip time at the HTTP layer. 46 // Returns the estimate of the round trip time at the HTTP layer.
47 const base::TimeDelta& http_rtt() const { return http_rtt_; } 47 const base::TimeDelta& http_rtt() const { return http_rtt_; }
48 48
49 void set_http_rtt(const base::TimeDelta& http_rtt) { http_rtt_ = http_rtt; }
50
49 // Returns the estimate of the round trip time at the transport layer. 51 // Returns the estimate of the round trip time at the transport layer.
50 const base::TimeDelta& transport_rtt() const { return transport_rtt_; } 52 const base::TimeDelta& transport_rtt() const { return transport_rtt_; }
51 53
54 void set_transport_rtt(const base::TimeDelta& transport_rtt) {
55 transport_rtt_ = transport_rtt;
56 }
57
52 // Returns the estimate of the downstream throughput in Kbps (Kilobits per 58 // Returns the estimate of the downstream throughput in Kbps (Kilobits per
53 // second). 59 // second).
54 int32_t downstream_throughput_kbps() const { 60 int32_t downstream_throughput_kbps() const {
55 return downstream_throughput_kbps_; 61 return downstream_throughput_kbps_;
56 } 62 }
57 63
64 void set_downstream_throughput_kbps(int32_t downstream_throughput_kbps) {
65 downstream_throughput_kbps_ = downstream_throughput_kbps;
66 }
67
58 private: 68 private:
59 // Estimated round trip time at the HTTP layer. 69 // Estimated round trip time at the HTTP layer.
60 base::TimeDelta http_rtt_; 70 base::TimeDelta http_rtt_;
61 71
62 // Estimated round trip time at the transport layer. 72 // Estimated round trip time at the transport layer.
63 base::TimeDelta transport_rtt_; 73 base::TimeDelta transport_rtt_;
64 74
65 // Estimated downstream throughput in kilobits per second. 75 // Estimated downstream throughput in kilobits per second.
66 int32_t downstream_throughput_kbps_; 76 int32_t downstream_throughput_kbps_;
67 }; 77 };
68 78
69 } // namespace internal 79 } // namespace internal
70 80
71 } // namespace nqe 81 } // namespace nqe
72 82
73 } // namespace net 83 } // namespace net
74 84
75 #endif // NET_NQE_NETWORK_QUALITY_H_ 85 #endif // NET_NQE_NETWORK_QUALITY_H_
OLDNEW
« no previous file with comments | « no previous file | net/nqe/network_quality_estimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698