| Index: chrome/browser/chromeos/cros/network_library.cc
|
| diff --git a/chrome/browser/chromeos/cros/network_library.cc b/chrome/browser/chromeos/cros/network_library.cc
|
| index 4cef679b9b0a7499dbbc7bace86383b48d18b3c8..4d6438c4489783821f57a6d6c59d4ed0efd1bf2c 100644
|
| --- a/chrome/browser/chromeos/cros/network_library.cc
|
| +++ b/chrome/browser/chromeos/cros/network_library.cc
|
| @@ -3341,7 +3341,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->name();
|
| + VLOG(2) << "Adding Network: " << network->service_path()
|
| + << " (" << network->name() << ")";
|
| ConnectionType type(network->type());
|
| if (type == TYPE_WIFI) {
|
| if (wifi_enabled())
|
| @@ -3482,8 +3483,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
|
| @@ -3666,15 +3669,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);
|
| @@ -3723,6 +3720,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();
|
|
|