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

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

Issue 2406763003: Add Network Quality observer to NQE (Closed)
Patch Set: ps Created 4 years, 2 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
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 #include "net/nqe/network_quality_estimator.h" 5 #include "net/nqe/network_quality_estimator.h"
6 6
7 #include <map> 7 #include <map>
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 recent_effective_connection_type_set_ = true; 75 recent_effective_connection_type_set_ = true;
76 recent_effective_connection_type_ = type; 76 recent_effective_connection_type_ = type;
77 } 77 }
78 78
79 // Returns the effective connection type that was set using 79 // Returns the effective connection type that was set using
80 // |set_effective_connection_type|. If the connection type has not been set, 80 // |set_effective_connection_type|. If the connection type has not been set,
81 // then the base implementation is called. 81 // then the base implementation is called.
82 EffectiveConnectionType GetRecentEffectiveConnectionType( 82 EffectiveConnectionType GetRecentEffectiveConnectionType(
83 const base::TimeTicks& start_time) const override; 83 const base::TimeTicks& start_time) const override;
84 84
85 // Returns the effective connection type that was set using
86 // |set_effective_connection_type|. If the connection type has not been set,
87 // then the base implementation is called.
RyanSturm 2016/10/11 01:46:26 Add comments about how |http_rtt|, |transport_rtt|
tbansal1 2016/10/11 17:46:12 Done.
88 EffectiveConnectionType GetRecentEffectiveConnectionTypeAndNetworkQuality(
89 const base::TimeTicks& start_time,
90 base::TimeDelta* http_rtt,
91 base::TimeDelta* transport_rtt,
92 int32_t* downstream_throughput_kbps) const override;
93
85 void set_http_rtt(const base::TimeDelta& http_rtt) { 94 void set_http_rtt(const base::TimeDelta& http_rtt) {
86 http_rtt_set_ = true; 95 http_rtt_set_ = true;
87 http_rtt_ = http_rtt; 96 http_rtt_ = http_rtt;
88 } 97 }
89 // Returns the HTTP RTT that was set using |set_http_rtt|. If the HTTP RTT has 98 // Returns the HTTP RTT that was set using |set_http_rtt|. If the HTTP RTT has
90 // not been set, then the base implementation is called. 99 // not been set, then the base implementation is called.
91 bool GetHttpRTT(base::TimeDelta* rtt) const override; 100 bool GetHttpRTT(base::TimeDelta* rtt) const override;
92 101
93 void set_recent_http_rtt(const base::TimeDelta& recent_http_rtt) { 102 void set_recent_http_rtt(const base::TimeDelta& recent_http_rtt) {
94 recent_http_rtt_set_ = true; 103 recent_http_rtt_set_ = true;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 int32_t recent_downlink_throughput_kbps_; 197 int32_t recent_downlink_throughput_kbps_;
189 198
190 double rand_double_; 199 double rand_double_;
191 200
192 EmbeddedTestServer embedded_test_server_; 201 EmbeddedTestServer embedded_test_server_;
193 202
194 DISALLOW_COPY_AND_ASSIGN(TestNetworkQualityEstimator); 203 DISALLOW_COPY_AND_ASSIGN(TestNetworkQualityEstimator);
195 }; 204 };
196 205
197 } // namespace net 206 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698