Commit 42b97a68 authored by balabasik's avatar balabasik Committed by Commit Bot

Fix "Stuck at CONNECTION_NONE" issue in NetworkChangeNotifier (Linux).

NetworkChangeNotifier::NetworkChangeCalculator::OnIPAddressChanged()
never updated the potentially incorrect |pending_connection_type_|
initial value of CONNECTION_NONE.
This caused detected IP address changes to trigger OnNetworkChanged()
events with incorrect connection types.
This fix sets |pending_connection_type_| accurately.

The issue was observed on home devices, where CONNECTION_NONE state
determines that the device is offline and blocks the OOBE flow.

Bug: 142898314
Change-Id: I8d15bd231beac73fc91963ebe162ae6fb59f6d4a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1873377
Commit-Queue: Valeriy Balabanov <balabasik@google.com>
Auto-Submit: Valeriy Balabanov <balabasik@google.com>
Reviewed-by: default avatarPaul Jensen <pauljensen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710008}
parent b0a785a1
......@@ -110,6 +110,7 @@ class NetworkChangeNotifier::NetworkChangeCalculator
// NetworkChangeNotifier::IPAddressObserver implementation.
void OnIPAddressChanged() override {
DCHECK(thread_checker_.CalledOnValidThread());
pending_connection_type_ = GetConnectionType();
base::TimeDelta delay = last_announced_connection_type_ == CONNECTION_NONE
? params_.ip_address_offline_delay_ : params_.ip_address_online_delay_;
// Cancels any previous timer.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment