Index: net/base/network_quality_estimator.h |
diff --git a/net/base/network_quality_estimator.h b/net/base/network_quality_estimator.h |
index 9fa0ad1817604c0472f8e5bafb9f78b619cfe477..bec34aa08b06d34fe1c2969e6e505298fbb1ca54 100644 |
--- a/net/base/network_quality_estimator.h |
+++ b/net/base/network_quality_estimator.h |
@@ -17,6 +17,7 @@ |
#include "base/macros.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
+#include "base/memory/weak_ptr.h" |
#include "base/observer_list.h" |
#include "base/threading/thread_checker.h" |
#include "base/time/time.h" |
@@ -166,6 +167,7 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimator |
const Protocol protocol) override; |
void OnUpdatedRTTAvailable(const Protocol protocol, |
const base::TimeDelta& rtt) override; |
+ void OnWatcherReset() override; |
// Adds |rtt_observer| to the list of round trip time observers. Must be |
// called on the IO thread. |
@@ -252,6 +254,7 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimator |
FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, |
TestExternalEstimateProviderMergeEstimates); |
FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestObservers); |
+ FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestTcpSocketRtt); |
// NetworkQuality is used to cache the quality of a network connection. |
class NET_EXPORT_PRIVATE NetworkQuality { |
@@ -520,6 +523,9 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimator |
void NotifyObserversOfThroughput(const ThroughputObservation& observation); |
+ // For use by SocketPerformanceWatcher. |
+ base::WeakPtr<NetworkQualityEstimator> GetWeakPtr(); |
Ryan Sleevi
2016/03/21 23:25:32
DESIGN: No external class should *ever* get access
tbansal1
2016/03/23 20:01:33
Done.
Ryan Sleevi
2016/03/25 01:45:34
I'm not sure what was done? In Patchset 16, you st
|
+ |
// Records the UMA related to RTT. |
void RecordRTTUMA(int32_t estimated_value_msec, |
int32_t actual_value_msec) const; |
@@ -597,6 +603,8 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimator |
base::ThreadChecker thread_checker_; |
+ base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); |
}; |