Const correct NetworkEmulationManager::GetStats

This make it easier to create parameters from a single endpoint ptr.

Bug: None
Change-Id: Id64757353505a21c7731655e1b7a3178fa2e5ef8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207425
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33263}
This commit is contained in:
Per Kjellander
2021-02-15 11:24:37 +01:00
committed by Commit Bot
parent 21347458ad
commit 410c99847b
3 changed files with 3 additions and 3 deletions

View File

@ -266,7 +266,7 @@ class NetworkEmulationManager {
// |stats_callback|. Callback will be executed on network emulation
// internal task queue.
virtual void GetStats(
rtc::ArrayView<EmulatedEndpoint*> endpoints,
rtc::ArrayView<EmulatedEndpoint* const> endpoints,
std::function<void(std::unique_ptr<EmulatedNetworkStats>)>
stats_callback) = 0;

View File

@ -270,7 +270,7 @@ NetworkEmulationManagerImpl::CreateEmulatedNetworkManagerInterface(
}
void NetworkEmulationManagerImpl::GetStats(
rtc::ArrayView<EmulatedEndpoint*> endpoints,
rtc::ArrayView<EmulatedEndpoint* const> endpoints,
std::function<void(std::unique_ptr<EmulatedNetworkStats>)> stats_callback) {
task_queue_.PostTask([endpoints, stats_callback]() {
EmulatedNetworkStatsBuilder stats_builder;

View File

@ -76,7 +76,7 @@ class NetworkEmulationManagerImpl : public NetworkEmulationManager {
EmulatedNetworkManagerInterface* CreateEmulatedNetworkManagerInterface(
const std::vector<EmulatedEndpoint*>& endpoints) override;
void GetStats(rtc::ArrayView<EmulatedEndpoint*> endpoints,
void GetStats(rtc::ArrayView<EmulatedEndpoint* const> endpoints,
std::function<void(std::unique_ptr<EmulatedNetworkStats>)>
stats_callback) override;