summaryrefslogtreecommitdiff
path: root/chromium/third_party/nearby/src/internal/platform/wifi_lan.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-09-29 16:16:15 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-11-09 10:04:06 +0000
commita95a7417ad456115a1ef2da4bb8320531c0821f1 (patch)
treeedcd59279e486d2fd4a8f88a7ed025bcf925c6e6 /chromium/third_party/nearby/src/internal/platform/wifi_lan.h
parent33fc33aa94d4add0878ec30dc818e34e1dd3cc2a (diff)
downloadqtwebengine-chromium-a95a7417ad456115a1ef2da4bb8320531c0821f1.tar.gz
BASELINE: Update Chromium to 106.0.5249.126
Change-Id: Ib0bb21c437a7d1686e21c33f2d329f2ac425b7ab Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/438936 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/nearby/src/internal/platform/wifi_lan.h')
-rw-r--r--chromium/third_party/nearby/src/internal/platform/wifi_lan.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/chromium/third_party/nearby/src/internal/platform/wifi_lan.h b/chromium/third_party/nearby/src/internal/platform/wifi_lan.h
index 4ec61ae5539..d93ad452d8e 100644
--- a/chromium/third_party/nearby/src/internal/platform/wifi_lan.h
+++ b/chromium/third_party/nearby/src/internal/platform/wifi_lan.h
@@ -192,7 +192,15 @@ class WifiLanMedium {
return impl_->GetDynamicPortRange();
}
- bool IsValid() const { return impl_ != nullptr; }
+ // Both SW and HW support WifiLan Medium
+ bool IsValid() const {
+ // When impl_ is not nullptr, it means platform layer SW is implemented for
+ // this Medium
+ if (impl_ == nullptr) return false;
+ // A network connection to a primary router exist, also implied that HW is
+ // existed and enabled.
+ return impl_->IsNetworkConnected();
+ }
api::WifiLanMedium& GetImpl() { return *impl_; }