OLD | NEW |
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/nqe/network_quality_estimator.h" | 5 #include "net/nqe/network_quality_estimator.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <limits> | 9 #include <limits> |
10 #include <utility> | 10 #include <utility> |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 EXTERNAL_ESTIMATE_PROVIDER_STATUS_AVAILABLE); | 312 EXTERNAL_ESTIMATE_PROVIDER_STATUS_AVAILABLE); |
313 external_estimate_provider_->SetUpdatedEstimateDelegate(this); | 313 external_estimate_provider_->SetUpdatedEstimateDelegate(this); |
314 } else { | 314 } else { |
315 RecordExternalEstimateProviderMetrics( | 315 RecordExternalEstimateProviderMetrics( |
316 EXTERNAL_ESTIMATE_PROVIDER_STATUS_NOT_AVAILABLE); | 316 EXTERNAL_ESTIMATE_PROVIDER_STATUS_NOT_AVAILABLE); |
317 } | 317 } |
318 current_network_id_ = GetCurrentNetworkID(); | 318 current_network_id_ = GetCurrentNetworkID(); |
319 AddDefaultEstimates(); | 319 AddDefaultEstimates(); |
320 | 320 |
321 throughput_analyzer_.reset(new nqe::internal::ThroughputAnalyzer( | 321 throughput_analyzer_.reset(new nqe::internal::ThroughputAnalyzer( |
322 base::ThreadTaskRunnerHandle::Get(), | 322 ¶ms_, base::ThreadTaskRunnerHandle::Get(), |
323 base::Bind(&NetworkQualityEstimator::OnNewThroughputObservationAvailable, | 323 base::Bind(&NetworkQualityEstimator::OnNewThroughputObservationAvailable, |
324 base::Unretained(this)), | 324 base::Unretained(this)), |
325 use_localhost_requests_, use_smaller_responses_for_tests)); | 325 use_localhost_requests_, use_smaller_responses_for_tests)); |
326 | 326 |
327 watcher_factory_.reset(new nqe::internal::SocketWatcherFactory( | 327 watcher_factory_.reset(new nqe::internal::SocketWatcherFactory( |
328 base::ThreadTaskRunnerHandle::Get(), | 328 base::ThreadTaskRunnerHandle::Get(), |
329 params_.min_socket_watcher_notification_interval(), | 329 params_.min_socket_watcher_notification_interval(), |
330 base::Bind(&NetworkQualityEstimator::OnUpdatedRTTAvailable, | 330 base::Bind(&NetworkQualityEstimator::OnUpdatedRTTAvailable, |
331 base::Unretained(this)), | 331 base::Unretained(this)), |
332 tick_clock_.get())); | 332 tick_clock_.get())); |
(...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1833 return base::Optional<base::TimeDelta>(); | 1833 return base::Optional<base::TimeDelta>(); |
1834 } | 1834 } |
1835 | 1835 |
1836 base::Optional<int32_t> | 1836 base::Optional<int32_t> |
1837 NetworkQualityEstimator::NetworkQualityProvider::GetDownstreamThroughputKbps() | 1837 NetworkQualityEstimator::NetworkQualityProvider::GetDownstreamThroughputKbps() |
1838 const { | 1838 const { |
1839 return base::Optional<int32_t>(); | 1839 return base::Optional<int32_t>(); |
1840 } | 1840 } |
1841 | 1841 |
1842 } // namespace net | 1842 } // namespace net |
OLD | NEW |