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

Unified Diff: chromeos/network/network_state.cc

Issue 280023003: Implement networkingPrivate.getNetworks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nonchromeos Created 6 years, 7 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
« no previous file with comments | « chromeos/network/favorite_state.cc ('k') | chromeos/network/network_state_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_state.cc
diff --git a/chromeos/network/network_state.cc b/chromeos/network/network_state.cc
index a50c7d59fe8ec356874bbf34ef43eb26951220b9..9cc868f80ae23300286b6952033ac7fa83320c4d 100644
--- a/chromeos/network/network_state.cc
+++ b/chromeos/network/network_state.cc
@@ -130,12 +130,22 @@ bool NetworkState::InitialPropertiesReceived(
if (!properties.HasKey(shill::kTypeProperty)) {
NET_LOG_ERROR("NetworkState has no type",
shill_property_util::GetNetworkIdFromProperties(properties));
- } else {
- changed |= UpdateName(properties);
+ return false;
}
+ // Ensure that the network has a valid name.
+ changed |= UpdateName(properties);
+
+ // Set the has_ca_cert_nss_ property.
bool had_ca_cert_nss = has_ca_cert_nss_;
has_ca_cert_nss_ = IsCaCertNssSet(properties);
changed |= had_ca_cert_nss != has_ca_cert_nss_;
+
+ // By convention, all visible WiFi networks have a SignalStrength > 0.
+ if (type() == shill::kTypeWifi) {
+ if (signal_strength_ <= 0)
+ signal_strength_ = 1;
+ }
+
return changed;
}
« no previous file with comments | « chromeos/network/favorite_state.cc ('k') | chromeos/network/network_state_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698