
All it provides is a method to call a signal on the network thread, so it's not worth the added complexity. Implementations of NetworkMonitorInterface must hop to the network thread anyway to guard their members. Also added some thread annotations to AndroidNetworkMonitor. Bug: webrtc:9883 Change-Id: I64bb82ea593433f3a52871dbb75eb2ac4f47d69c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181420 Commit-Queue: Taylor <deadbeef@webrtc.org> Reviewed-by: Anders Carlsson <andersc@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32087}
28 lines
831 B
C++
28 lines
831 B
C++
/*
|
|
* Copyright 2015 The WebRTC Project Authors. All rights reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#include "rtc_base/network_monitor.h"
|
|
|
|
namespace rtc {
|
|
|
|
const char* NetworkPreferenceToString(NetworkPreference preference) {
|
|
switch (preference) {
|
|
case NetworkPreference::NEUTRAL:
|
|
return "NEUTRAL";
|
|
case NetworkPreference::NOT_PREFERRED:
|
|
return "NOT_PREFERRED";
|
|
}
|
|
}
|
|
|
|
NetworkMonitorInterface::NetworkMonitorInterface() {}
|
|
NetworkMonitorInterface::~NetworkMonitorInterface() {}
|
|
|
|
} // namespace rtc
|