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

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

Issue 1144163008: Add in-memory caching of network quality estimates across network changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 years, 6 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/base/network_quality.cc » ('j') | net/base/network_quality_estimator.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_BASE_NETWORK_QUALITY_H_ 5 #ifndef NET_BASE_NETWORK_QUALITY_H_
6 #define NET_BASE_NETWORK_QUALITY_H_ 6 #define NET_BASE_NETWORK_QUALITY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "net/base/net_export.h" 11 #include "net/base/net_export.h"
12 12
13 namespace net { 13 namespace net {
14 14
15 // API that is used to report the network quality of a network connection as 15 // API that is used to report the network quality of a network connection as
16 // estimated by the NetworkQualityEstimator. 16 // estimated by the NetworkQualityEstimator.
17 class NET_EXPORT_PRIVATE NetworkQuality { 17 class NET_EXPORT_PRIVATE NetworkQuality {
18 public: 18 public:
19 // |rtt| is the estimate of the round trip time. 19 // |rtt| is the estimate of the round trip time.
20 // |downstream_throughput_kbps| is the estimate of the downstream throughput. 20 // |downstream_throughput_kbps| is the estimate of the downstream throughput.
21 NetworkQuality(const base::TimeDelta& rtt, 21 NetworkQuality(const base::TimeDelta& rtt,
22 int32_t downstream_throughput_kbps); 22 int32_t downstream_throughput_kbps);
23 23
pauljensen 2015/06/23 11:52:10 remove new line
tbansal1 2015/07/13 21:21:26 Done.
24 NetworkQuality(const NetworkQuality& other);
25
pauljensen 2015/06/23 11:52:10 remove new line
24 ~NetworkQuality(); 26 ~NetworkQuality();
25 27
28 NetworkQuality& operator=(const NetworkQuality& other);
29
26 // Returns the estimate of the round trip time. 30 // Returns the estimate of the round trip time.
27 const base::TimeDelta& rtt() const { return rtt_; } 31 const base::TimeDelta& rtt() const { return rtt_; }
28 32
29 // Returns the estimate of the downstream throughput in Kbps (Kilo bits per 33 // Returns the estimate of the downstream throughput in Kbps (Kilo bits per
30 // second). 34 // second).
31 int32_t downstream_throughput_kbps() const { 35 int32_t downstream_throughput_kbps() const {
32 return downstream_throughput_kbps_; 36 return downstream_throughput_kbps_;
33 } 37 }
34 38
35 private: 39 private:
36 // Estimated round trip time. 40 // Estimated round trip time.
37 const base::TimeDelta rtt_; 41 base::TimeDelta rtt_;
38 42
39 // Estimated downstream throughput in Kbps. 43 // Estimated downstream throughput in Kbps.
40 const int32_t downstream_throughput_kbps_; 44 int32_t downstream_throughput_kbps_;
41 }; 45 };
42 46
43 } // namespace net 47 } // namespace net
44 48
45 #endif // NET_BASE_NETWORK_QUALITY_H_ 49 #endif // NET_BASE_NETWORK_QUALITY_H_
OLDNEW
« no previous file with comments | « no previous file | net/base/network_quality.cc » ('j') | net/base/network_quality_estimator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698