Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3585)

Unified Diff: android_webview/browser/net/aw_network_change_notifier.cc

Issue 1745663003: Revert of [Android WebView] Implement support for Network Information API and enable it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/browser/net/aw_network_change_notifier.cc
diff --git a/android_webview/browser/net/aw_network_change_notifier.cc b/android_webview/browser/net/aw_network_change_notifier.cc
deleted file mode 100644
index f91aefcd510982761f715df79bfb1fc8ecbbf367..0000000000000000000000000000000000000000
--- a/android_webview/browser/net/aw_network_change_notifier.cc
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "android_webview/browser/net/aw_network_change_notifier.h"
-
-namespace android_webview {
-
-AwNetworkChangeNotifier::~AwNetworkChangeNotifier() {
- delegate_->RemoveObserver(this);
-}
-
-net::NetworkChangeNotifier::ConnectionType
-AwNetworkChangeNotifier::GetCurrentConnectionType() const {
- return delegate_->GetCurrentConnectionType();
-}
-
-void AwNetworkChangeNotifier::GetCurrentMaxBandwidthAndConnectionType(
- double* max_bandwidth_mbps,
- ConnectionType* connection_type) const {
- delegate_->GetCurrentMaxBandwidthAndConnectionType(max_bandwidth_mbps,
- connection_type);
-}
-
-bool AwNetworkChangeNotifier::AreNetworkHandlesCurrentlySupported() const {
- return false;
-}
-
-void AwNetworkChangeNotifier::GetCurrentConnectedNetworks(
- NetworkChangeNotifier::NetworkList* networks) const {
- delegate_->GetCurrentlyConnectedNetworks(networks);
-}
-
-net::NetworkChangeNotifier::ConnectionType
-AwNetworkChangeNotifier::GetCurrentNetworkConnectionType(
- NetworkHandle network) const {
- return delegate_->GetNetworkConnectionType(network);
-}
-
-net::NetworkChangeNotifier::NetworkHandle
-AwNetworkChangeNotifier::GetCurrentDefaultNetwork() const {
- return delegate_->GetCurrentDefaultNetwork();
-}
-
-void AwNetworkChangeNotifier::OnConnectionTypeChanged() {}
-
-void AwNetworkChangeNotifier::OnMaxBandwidthChanged(
- double max_bandwidth_mbps,
- ConnectionType type) {
- // Note that this callback is sufficient for Network Information API because
- // it also occurs on type changes (see network_change_notifier.h).
- NetworkChangeNotifier::NotifyObserversOfMaxBandwidthChange(max_bandwidth_mbps,
- type);
-}
-
-void AwNetworkChangeNotifier::OnNetworkConnected(NetworkHandle network) {}
-void AwNetworkChangeNotifier::OnNetworkSoonToDisconnect(
- NetworkHandle network) {}
-void AwNetworkChangeNotifier::OnNetworkDisconnected(
- NetworkHandle network) {}
-void AwNetworkChangeNotifier::OnNetworkMadeDefault(NetworkHandle network){}
-
-AwNetworkChangeNotifier::AwNetworkChangeNotifier(
- net::NetworkChangeNotifierDelegateAndroid* delegate)
- : net::NetworkChangeNotifier(DefaultNetworkChangeCalculatorParams()),
- delegate_(delegate) {
- delegate_->AddObserver(this);
-}
-
-// static
-net::NetworkChangeNotifier::NetworkChangeCalculatorParams
-AwNetworkChangeNotifier::DefaultNetworkChangeCalculatorParams() {
- net::NetworkChangeNotifier::NetworkChangeCalculatorParams params;
- // Use defaults as in network_change_notifier_android.cc
- params.ip_address_offline_delay_ = base::TimeDelta::FromSeconds(1);
- params.ip_address_online_delay_ = base::TimeDelta::FromSeconds(1);
- params.connection_type_offline_delay_ = base::TimeDelta::FromSeconds(0);
- params.connection_type_online_delay_ = base::TimeDelta::FromSeconds(0);
- return params;
-}
-
-} // namespace android_webview

Powered by Google App Engine
This is Rietveld 408576698