summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchocobo@google.com <chocobo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-09 18:08:43 +0000
committerchocobo@google.com <chocobo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-09 18:08:43 +0000
commitd7aab51d952b795f4753c269922a90845973af78 (patch)
tree7b81eb7f9a704dc6dedb154b0718cf71058b6287
parentfe48fb8a1a473dc7633e5657b4b0c2740153126c (diff)
downloadchromium_src-d7aab51d952b795f4753c269922a90845973af78.zip
chromium_src-d7aab51d952b795f4753c269922a90845973af78.tar.gz
chromium_src-d7aab51d952b795f4753c269922a90845973af78.tar.bz2
Update cros network library code to work with the latest cros API that sends network updates with ServiceStatus. This fixes the issue where if we are connected to ethernet, we won't get wifi network updates.
BUG=23923 TEST=none Review URL: http://codereview.chromium.org/269029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28562 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/cros_network_library.cc5
-rw-r--r--chrome/browser/chromeos/cros_network_library.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/cros_network_library.cc b/chrome/browser/chromeos/cros_network_library.cc
index 0db1da7..fa55fca 100644
--- a/chrome/browser/chromeos/cros_network_library.cc
+++ b/chrome/browser/chromeos/cros_network_library.cc
@@ -92,9 +92,10 @@ void CrosNetworkLibrary::ConnectToWifiNetwork(WifiNetwork network,
// static
void CrosNetworkLibrary::NetworkStatusChangedHandler(void* object,
- const chromeos::ServiceInfo& service) {
+ const chromeos::ServiceStatus& service_status) {
CrosNetworkLibrary* network = static_cast<CrosNetworkLibrary*>(object);
- network->ParseNetworkServiceInfo(service);
+ for (int i = 0; i < service_status.size; i++)
+ network->ParseNetworkServiceInfo(service_status.services[i]);
FOR_EACH_OBSERVER(Observer, network->observers_, NetworkChanged(network));
}
diff --git a/chrome/browser/chromeos/cros_network_library.h b/chrome/browser/chromeos/cros_network_library.h
index b73e1e6..884282b 100644
--- a/chrome/browser/chromeos/cros_network_library.h
+++ b/chrome/browser/chromeos/cros_network_library.h
@@ -73,7 +73,7 @@ class CrosNetworkLibrary {
// This method is called when there's a change in network status.
// This will notify all the Observers.
static void NetworkStatusChangedHandler(void* object,
- const chromeos::ServiceInfo& service);
+ const chromeos::ServiceStatus& service_status);
// Parse a ServiceInfo objects and update our status.
void ParseNetworkServiceInfo(const chromeos::ServiceInfo& service);