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

Side by Side Diff: net/base/network_quality_estimator.cc

Issue 1376473003: Notify NQE of TCP RTT values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed bengr comments Created 4 years, 10 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 | « net/base/network_quality_estimator.h ('k') | net/base/network_quality_estimator_unittest.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 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 #include "net/base/network_quality_estimator.h" 5 #include "net/base/network_quality_estimator.h"
6 6
7 #include <float.h> 7 #include <float.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <cmath> 9 #include <cmath>
10 #include <limits> 10 #include <limits>
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 NotifyObserversOfRTT(RttObservation(rtt, base::TimeTicks::Now(), TCP)); 905 NotifyObserversOfRTT(RttObservation(rtt, base::TimeTicks::Now(), TCP));
906 return; 906 return;
907 case PROTOCOL_QUIC: 907 case PROTOCOL_QUIC:
908 NotifyObserversOfRTT(RttObservation(rtt, base::TimeTicks::Now(), QUIC)); 908 NotifyObserversOfRTT(RttObservation(rtt, base::TimeTicks::Now(), QUIC));
909 return; 909 return;
910 default: 910 default:
911 NOTREACHED(); 911 NOTREACHED();
912 } 912 }
913 } 913 }
914 914
915 void NetworkQualityEstimator::OnWatcherReset() {
916 DCHECK(thread_checker_.CalledOnValidThread());
917 // Nothing needs to be done for RTT observations.
bengr 2016/02/08 23:42:06 Can you say why?
tbansal1 2016/02/09 17:11:22 Done.
918 }
919
915 void NetworkQualityEstimator::NotifyObserversOfRTT( 920 void NetworkQualityEstimator::NotifyObserversOfRTT(
916 const RttObservation& observation) { 921 const RttObservation& observation) {
917 FOR_EACH_OBSERVER( 922 FOR_EACH_OBSERVER(
918 RTTObserver, rtt_observer_list_, 923 RTTObserver, rtt_observer_list_,
919 OnRTTObservation(observation.value.InMilliseconds(), 924 OnRTTObservation(observation.value.InMilliseconds(),
920 observation.timestamp, observation.source)); 925 observation.timestamp, observation.source));
921 } 926 }
922 927
923 void NetworkQualityEstimator::NotifyObserversOfThroughput( 928 void NetworkQualityEstimator::NotifyObserversOfThroughput(
924 const ThroughputObservation& observation) { 929 const ThroughputObservation& observation) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 973
969 NetworkQualityEstimator::NetworkQuality& 974 NetworkQualityEstimator::NetworkQuality&
970 NetworkQualityEstimator::NetworkQuality:: 975 NetworkQualityEstimator::NetworkQuality::
971 operator=(const NetworkQuality& other) { 976 operator=(const NetworkQuality& other) {
972 rtt_ = other.rtt_; 977 rtt_ = other.rtt_;
973 downstream_throughput_kbps_ = other.downstream_throughput_kbps_; 978 downstream_throughput_kbps_ = other.downstream_throughput_kbps_;
974 return *this; 979 return *this;
975 } 980 }
976 981
977 } // namespace net 982 } // namespace net
OLDNEW
« no previous file with comments | « net/base/network_quality_estimator.h ('k') | net/base/network_quality_estimator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698