54 lines
1.9 KiB
Diff
54 lines
1.9 KiB
Diff
From: uazo <uazo@users.noreply.github.com>
|
|
Date: Thu, 14 Jul 2022 09:48:45 +0000
|
|
Subject: Remove navigator.connection info
|
|
|
|
Change the result of navigator.connection to default values
|
|
and disable observers
|
|
|
|
Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
|
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
|
---
|
|
.../blink/renderer/modules/netinfo/network_information.cc | 7 ++++++-
|
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/third_party/blink/renderer/modules/netinfo/network_information.cc b/third_party/blink/renderer/modules/netinfo/network_information.cc
|
|
--- a/third_party/blink/renderer/modules/netinfo/network_information.cc
|
|
+++ b/third_party/blink/renderer/modules/netinfo/network_information.cc
|
|
@@ -61,7 +61,7 @@ NetworkInformation::~NetworkInformation() {
|
|
}
|
|
|
|
bool NetworkInformation::IsObserving() const {
|
|
- return !!connection_observer_handle_;
|
|
+ return false;
|
|
}
|
|
|
|
String NetworkInformation::type() const {
|
|
@@ -147,6 +147,7 @@ void NetworkInformation::ConnectionChange(
|
|
const absl::optional<base::TimeDelta>& transport_rtt,
|
|
const absl::optional<double>& downlink_mbps,
|
|
bool save_data) {
|
|
+ if ((true)) return;
|
|
DCHECK(GetExecutionContext()->IsContextThread());
|
|
|
|
const String host = Host();
|
|
@@ -242,6 +243,8 @@ void NetworkInformation::ContextDestroyed() {
|
|
}
|
|
|
|
void NetworkInformation::StartObserving() {
|
|
+ //is_fake_observing_ = true;
|
|
+ if ((true)) return;
|
|
if (!IsObserving() && !context_stopped_) {
|
|
type_ = GetNetworkStateNotifier().ConnectionType();
|
|
DCHECK(!connection_observer_handle_);
|
|
@@ -252,6 +255,8 @@ void NetworkInformation::StartObserving() {
|
|
}
|
|
|
|
void NetworkInformation::StopObserving() {
|
|
+ //is_fake_observing_ = false;
|
|
+ if ((true)) return;
|
|
if (IsObserving()) {
|
|
DCHECK(connection_observer_handle_);
|
|
connection_observer_handle_ = nullptr;
|
|
--
|
|
2.25.1
|