summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorers@chromium.org <ers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-14 03:03:40 +0000
committerers@chromium.org <ers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-14 03:03:40 +0000
commitd07a87b7b3c681e1c139323c7046dc1bcd6bd02c (patch)
tree331f8ce30c0d9d87ee61a935d55b4acc464d0076
parentbc7f28c206662f1b3ebd394b8c475537fa672a65 (diff)
downloadchromium_src-d07a87b7b3c681e1c139323c7046dc1bcd6bd02c.zip
chromium_src-d07a87b7b3c681e1c139323c7046dc1bcd6bd02c.tar.gz
chromium_src-d07a87b7b3c681e1c139323c7046dc1bcd6bd02c.tar.bz2
Merge 85338 - Really fix chromium-os:14180 this time.
Add the device change property manager in the correct branch of the if statement. BUG=chromium-os:14180 TEST=Bring up the cellular device tab, and see that it is now populated with actual values instead of being blank. R=stevenjb@chromium.org Review URL: http://codereview.chromium.org/7011023 TBR=ers@chromium.org Review URL: http://codereview.chromium.org/7016046 git-svn-id: svn://svn.chromium.org/chrome/branches/742/src@85370 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/cros/network_library.cc21
1 files changed, 12 insertions, 9 deletions
diff --git a/chrome/browser/chromeos/cros/network_library.cc b/chrome/browser/chromeos/cros/network_library.cc
index 76ad2c8..ed411fb 100644
--- a/chrome/browser/chromeos/cros/network_library.cc
+++ b/chrome/browser/chromeos/cros/network_library.cc
@@ -3290,6 +3290,8 @@ class NetworkLibraryImpl : public NetworkLibrary {
std::pair<NetworkMap::iterator,bool> result =
network_map_.insert(std::make_pair(network->service_path(), network));
DCHECK(result.second); // Should only get called with new network.
+ VLOG(2) << "Adding Network: " << network->service_path()
+ << " (" << network->name() << ")";
ConnectionType type(network->type());
if (type == TYPE_WIFI) {
if (wifi_enabled())
@@ -3461,8 +3463,10 @@ class NetworkLibraryImpl : public NetworkLibrary {
// Request the active profile which lists the remembered networks.
void RequestRememberedNetworksUpdate() {
- RequestNetworkProfile(
- active_profile_path_.c_str(), &ProfileUpdate, this);
+ if (!active_profile_path_.empty()) {
+ RequestNetworkProfile(
+ active_profile_path_.c_str(), &ProfileUpdate, this);
+ }
}
// Update the list of remembered (profile) networks, and request associated
@@ -3643,15 +3647,9 @@ class NetworkLibraryImpl : public NetworkLibrary {
if (!device_path.empty()) {
NetworkDeviceMap::iterator found = old_device_map.find(device_path);
if (found != old_device_map.end()) {
- VLOG(2) << " Adding device: " << device_path;
+ VLOG(2) << " Adding existing device: " << device_path;
device_map_[device_path] = found->second;
old_device_map.erase(found);
- // Add device property monitor before we request the
- // full property list, to ensure that we won't miss any
- // property changes.
- network_device_observers_[device_path] =
- new NetworkDeviceObserverList(this, device_path);
-
}
RequestNetworkDeviceInfo(
device_path.c_str(), &NetworkDeviceUpdate, this);
@@ -3700,6 +3698,11 @@ class NetworkLibraryImpl : public NetworkLibrary {
device = new NetworkDevice(device_path);
VLOG(2) << " Adding device: " << device_path;
device_map_[device_path] = device;
+ if (network_device_observers_.find(device_path) ==
+ network_device_observers_.end()) {
+ network_device_observers_[device_path] =
+ new NetworkDeviceObserverList(this, device_path);
+ }
}
device->ParseInfo(info);
VLOG(1) << "ParseNetworkDevice:" << device->name();