Commit 2592bd4a authored by Anna Malova's avatar Anna Malova Committed by Commit Bot

Convert ThroughputObservationCallback to RepeatingCallback.

Bug: 1007815
Change-Id: I72241731610b566ca062ff95f8fd94289999b3a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2083327Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Commit-Queue: Anna Malova <amalova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746379}
parent 47bfc2a8
......@@ -183,8 +183,9 @@ NetworkQualityEstimator::NetworkQualityEstimator(
NetworkChangeNotifier::AddConnectionTypeObserver(this);
throughput_analyzer_.reset(new nqe::internal::ThroughputAnalyzer(
this, params_.get(), base::ThreadTaskRunnerHandle::Get(),
base::Bind(&NetworkQualityEstimator::OnNewThroughputObservationAvailable,
weak_ptr_factory_.GetWeakPtr()),
base::BindRepeating(
&NetworkQualityEstimator::OnNewThroughputObservationAvailable,
weak_ptr_factory_.GetWeakPtr()),
tick_clock_, net_log_));
watcher_factory_.reset(new nqe::internal::SocketWatcherFactory(
......
......@@ -20,7 +20,7 @@
#include "net/log/net_log_with_source.h"
namespace {
typedef base::Callback<void(int32_t)> ThroughputObservationCallback;
typedef base::RepeatingCallback<void(int32_t)> ThroughputObservationCallback;
}
namespace base {
......
......@@ -59,7 +59,7 @@ class TestThroughputAnalyzer : public internal::ThroughputAnalyzer {
network_quality_estimator,
params,
base::ThreadTaskRunnerHandle::Get(),
base::Bind(
base::BindRepeating(
&TestThroughputAnalyzer::OnNewThroughputObservationAvailable,
base::Unretained(this)),
tick_clock,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment