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

Unified Diff: chromeos/network/network_state_handler.cc

Issue 12634019: NetworkChangeNotifierChromeos: Handle IPConfig property changes on the default network (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more cleanup Created 7 years, 9 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: chromeos/network/network_state_handler.cc
diff --git a/chromeos/network/network_state_handler.cc b/chromeos/network/network_state_handler.cc
index d1ca44f89dc48c4244762c17d353910a116d685a..ce65132a00388ed099568bd319811b3d2213e753 100644
--- a/chromeos/network/network_state_handler.cc
+++ b/chromeos/network/network_state_handler.cc
@@ -393,8 +393,14 @@ void NetworkStateHandler::UpdateNetworkServiceProperty(
std::string prev_connection_state = network->connection_state();
if (!network->PropertyChanged(key, value))
return;
- if (network->connection_state() != prev_connection_state)
+ if (network->connection_state() != prev_connection_state) {
OnNetworkConnectionStateChanged(network);
+ } else if (network->path() == default_network_path_) {
+ // WiFi signal strength updates are too noisy, so don't
+ // trigger default network updates for those changes.
+ if (key != flimflam::kSignalStrengthProperty)
stevenjb 2013/03/27 22:18:52 nit: add to if clause above
gauravsh 2013/03/27 23:16:04 Done.
+ OnDefaultNetworkChanged();
+ }
NetworkPropertiesUpdated(network);
@@ -405,18 +411,6 @@ void NetworkStateHandler::UpdateNetworkServiceProperty(
network_event_log::AddEntry(kLogModule, "NetworkPropertyUpdated", detail);
}
-void NetworkStateHandler::UpdateNetworkServiceIPAddress(
- const std::string& service_path,
- const std::string& ip_address) {
- NetworkState* network = GetModifiableNetworkState(service_path);
- if (!network)
- return;
- std::string detail = network->name() + ".IPAddress = " + ip_address;
- network_event_log::AddEntry(kLogModule, "NetworkIPChanged", detail);
- network->set_ip_address(ip_address);
- NetworkPropertiesUpdated(network);
-}
-
void NetworkStateHandler::UpdateDeviceProperty(const std::string& device_path,
const std::string& key,
const base::Value& value) {

Powered by Google App Engine
This is Rietveld 408576698