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

Unified Diff: ash/system/chromeos/network/tray_network_state_observer.cc

Issue 286923003: Observe ConnectionState changed events in TrayNetworkStateObserver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 | « ash/system/chromeos/network/tray_network_state_observer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/network/tray_network_state_observer.cc
diff --git a/ash/system/chromeos/network/tray_network_state_observer.cc b/ash/system/chromeos/network/tray_network_state_observer.cc
index 6de9bfedcbf95635e589e28d5586c91634d66dd8..86d514d849d01060ff0bd6e7c047e1efdf5ec2ca 100644
--- a/ash/system/chromeos/network/tray_network_state_observer.cc
+++ b/ash/system/chromeos/network/tray_network_state_observer.cc
@@ -41,16 +41,32 @@ void TrayNetworkStateObserver::DeviceListChanged() {
delegate_->NetworkStateChanged(false);
}
+// Any change to the Default (primary connected) network, including Strength
+// changes, should trigger a NetworkStateChanged update.
void TrayNetworkStateObserver::DefaultNetworkChanged(
const chromeos::NetworkState* network) {
delegate_->NetworkStateChanged(true);
}
+// Any change to the Connection State should trigger a NetworkStateChanged
+// update. This is important when both a VPN and a physical network are
+// connected.
+void TrayNetworkStateObserver::NetworkConnectionStateChanged(
+ const chromeos::NetworkState* network) {
+ delegate_->NetworkStateChanged(true);
+}
+
+// This tracks Strength and other property changes for all networks. It will
+// be called in addtion to NetworkConnectionStateChanged for connection state
Ben Chan 2014/05/16 23:24:26 typo: addtion -> addition
stevenjb 2014/05/16 23:29:29 Done.
+// changes.
void TrayNetworkStateObserver::NetworkPropertiesUpdated(
const chromeos::NetworkState* network) {
if (network ==
- NetworkHandler::Get()->network_state_handler()->DefaultNetwork())
+ NetworkHandler::Get()->network_state_handler()->DefaultNetwork()) {
+ // Trigger NetworkStateChanged in case the Strength property of the
+ // Default network changed.
delegate_->NetworkStateChanged(true);
+ }
delegate_->NetworkServiceChanged(network);
}
« no previous file with comments | « ash/system/chromeos/network/tray_network_state_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698