Commit 08e3ac0b authored by Jon Mann's avatar Jon Mann Committed by Chromium LUCI CQ

Wi-Fi Sync: Temporarily stop syncing the metered property.

Chrome doesn't yet track the "Automatic" state for the metered property
of networks.  To avoid setting networks permanently to the current
automatic state, this change temporarily marks all networks as
auto until we can get the information from Shill.

Bug: 1128692
Change-Id: I2a7295ed9cdfb106b5c3b894d0963b006046bfbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2631469
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Auto-Submit: Jon Mann <jonmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844098}
parent 4e64c75a
...@@ -209,14 +209,8 @@ void LocalNetworkCollectorImpl::OnGetManagedPropertiesResult( ...@@ -209,14 +209,8 @@ void LocalNetworkCollectorImpl::OnGetManagedPropertiesResult(
properties->type_properties->get_wifi()->auto_connect)); properties->type_properties->get_wifi()->auto_connect));
proto.set_is_preferred(IsPreferredProtoFromMojo(properties->priority)); proto.set_is_preferred(IsPreferredProtoFromMojo(properties->priority));
if (properties->metered) { // TODO(crbug/1128692): Restore support for the metered property when mojo
proto.set_metered( // networks track the "Automatic" state.
properties->metered->active_value
? sync_pb::
WifiConfigurationSpecifics_MeteredOption_METERED_OPTION_YES
: sync_pb::
WifiConfigurationSpecifics_MeteredOption_METERED_OPTION_NO);
}
bool is_proxy_modified = bool is_proxy_modified =
network_metadata_store_->GetIsFieldExternallyModified( network_metadata_store_->GetIsFieldExternallyModified(
......
...@@ -276,17 +276,8 @@ network_config::mojom::ConfigPropertiesPtr MojoNetworkConfigFromProto( ...@@ -276,17 +276,8 @@ network_config::mojom::ConfigPropertiesPtr MojoNetworkConfigFromProto(
? 1 ? 1
: 0); : 0);
if (specifics.has_metered() && // TODO(crbug/1128692): Restore support for the metered property when mojo
specifics.metered() != // networks track the "Automatic" state.
sync_pb::
WifiConfigurationSpecifics_MeteredOption_METERED_OPTION_UNSPECIFIED &&
specifics.metered() !=
sync_pb::
WifiConfigurationSpecifics_MeteredOption_METERED_OPTION_AUTO) {
config->metered = network_config::mojom::MeteredConfig::New(
specifics.metered() ==
sync_pb::WifiConfigurationSpecifics_MeteredOption_METERED_OPTION_YES);
}
// For backwards compatibility, any available custom nameservers are still // For backwards compatibility, any available custom nameservers are still
// applied when the dns_option is not set. // applied when the dns_option is not set.
......
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