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

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

Issue 2172403002: Provide default thresholds for effective connection types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bengr comments Created 4 years, 4 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.cc » ('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 25 matching lines...) Expand all
36 NetworkQuality(const base::TimeDelta& http_rtt, 36 NetworkQuality(const base::TimeDelta& http_rtt,
37 const base::TimeDelta& transport_rtt, 37 const base::TimeDelta& transport_rtt,
38 int32_t downstream_throughput_kbps); 38 int32_t downstream_throughput_kbps);
39 NetworkQuality(const NetworkQuality& other); 39 NetworkQuality(const NetworkQuality& other);
40 ~NetworkQuality(); 40 ~NetworkQuality();
41 41
42 NetworkQuality& operator=(const NetworkQuality& other); 42 NetworkQuality& operator=(const NetworkQuality& other);
43 43
44 bool operator==(const NetworkQuality& other) const; 44 bool operator==(const NetworkQuality& other) const;
45 45
46 // Returns true if |this| is at least as fast as |other| for all parameters
47 // (HTTP RTT, transport RTT etc.)
48 bool IsFaster(const NetworkQuality& other) const;
49
46 // Returns the estimate of the round trip time at the HTTP layer. 50 // Returns the estimate of the round trip time at the HTTP layer.
47 const base::TimeDelta& http_rtt() const { return http_rtt_; } 51 const base::TimeDelta& http_rtt() const { return http_rtt_; }
48 52
49 void set_http_rtt(const base::TimeDelta& http_rtt) { http_rtt_ = http_rtt; } 53 void set_http_rtt(const base::TimeDelta& http_rtt) { http_rtt_ = http_rtt; }
50 54
51 // Returns the estimate of the round trip time at the transport layer. 55 // Returns the estimate of the round trip time at the transport layer.
52 const base::TimeDelta& transport_rtt() const { return transport_rtt_; } 56 const base::TimeDelta& transport_rtt() const { return transport_rtt_; }
53 57
54 void set_transport_rtt(const base::TimeDelta& transport_rtt) { 58 void set_transport_rtt(const base::TimeDelta& transport_rtt) {
55 transport_rtt_ = transport_rtt; 59 transport_rtt_ = transport_rtt;
(...skipping 18 matching lines...) Expand all
74 78
75 // Estimated downstream throughput in kilobits per second. 79 // Estimated downstream throughput in kilobits per second.
76 int32_t downstream_throughput_kbps_; 80 int32_t downstream_throughput_kbps_;
77 }; 81 };
78 82
79 } // namespace internal 83 } // namespace internal
80 } // namespace nqe 84 } // namespace nqe
81 } // namespace net 85 } // namespace net
82 86
83 #endif // NET_NQE_NETWORK_QUALITY_H_ 87 #endif // NET_NQE_NETWORK_QUALITY_H_
OLDNEW
« no previous file with comments | « no previous file | net/nqe/network_quality.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698