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

Side by Side Diff: chrome/browser/chromeos/cros/network_library_impl_cros.cc

Issue 10849003: This fixes connecting to hidden networks by not marking them failed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed indent Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/cros/network_library_impl_base.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/cros/network_library_impl_cros.h" 5 #include "chrome/browser/chromeos/cros/network_library_impl_cros.h"
6 6
7 #include <dbus/dbus-glib.h> 7 #include <dbus/dbus-glib.h>
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/json/json_writer.h" // for debug output only. 9 #include "base/json/json_writer.h" // for debug output only.
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 } 832 }
833 // Iterate through list of remaining networks that are no longer in the 833 // Iterate through list of remaining networks that are no longer in the
834 // list and delete them or update their status and re-add them to the list. 834 // list and delete them or update their status and re-add them to the list.
835 for (NetworkMap::iterator iter = old_network_map.begin(); 835 for (NetworkMap::iterator iter = old_network_map.begin();
836 iter != old_network_map.end(); ++iter) { 836 iter != old_network_map.end(); ++iter) {
837 Network* network = iter->second; 837 Network* network = iter->second;
838 VLOG(2) << "Delete Network: " << network->name() 838 VLOG(2) << "Delete Network: " << network->name()
839 << " State = " << network->GetStateString() 839 << " State = " << network->GetStateString()
840 << " connecting = " << network->connecting() 840 << " connecting = " << network->connecting()
841 << " connection_started = " << network->connection_started(); 841 << " connection_started = " << network->connection_started();
842 WifiNetwork* wifi = NULL;
843 if (network->type() == TYPE_WIFI)
844 wifi = static_cast<WifiNetwork*>(network);
842 if (network->failed() && network->notify_failure()) { 845 if (network->failed() && network->notify_failure()) {
843 // We have not notified observers of a connection failure yet. 846 // We have not notified observers of a connection failure yet.
844 AddNetwork(network); 847 AddNetwork(network);
845 } else if (network->connecting() && network->connection_started()) { 848 } else if (network->connecting() && network->connection_started() &&
846 // Network was in connecting state; set state to failed. 849 !(wifi && wifi->hidden_ssid())) {
Paul Stewart 2012/07/31 20:21:32 This says we should disable this check for all non
Greg Spencer (Chromium) 2012/07/31 20:27:10 No that's not the correct interpretation, because
Paul Stewart 2012/07/31 20:29:52 Sorry. Yeah, that's right.
850 // Network was in connecting state; set state to failed, but not if it
851 // had a hidden SSID (since that won't appear in the scanning list).
847 VLOG(2) << "Removed network was connecting: " << network->name(); 852 VLOG(2) << "Removed network was connecting: " << network->name();
848 network->SetState(STATE_FAILURE); 853 network->SetState(STATE_FAILURE);
849 AddNetwork(network); 854 AddNetwork(network);
850 } else { 855 } else {
851 VLOG(2) << "Deleting removed network: " << network->name() 856 VLOG(2) << "Deleting removed network: " << network->name()
852 << " State = " << network->GetStateString(); 857 << " State = " << network->GetStateString();
853 DeleteNetwork(network); 858 DeleteNetwork(network);
854 } 859 }
855 } 860 }
856 // If the last network has disappeared, nothing else will 861 // If the last network has disappeared, nothing else will
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 // Switch back to signed settings value. 1186 // Switch back to signed settings value.
1182 SetCellularDataRoamingAllowed(settings_value); 1187 SetCellularDataRoamingAllowed(settings_value);
1183 } 1188 }
1184 } 1189 }
1185 } 1190 }
1186 NotifyNetworkManagerChanged(false); // Not forced. 1191 NotifyNetworkManagerChanged(false); // Not forced.
1187 AddNetworkDeviceObserver(device_path, network_device_observer_.get()); 1192 AddNetworkDeviceObserver(device_path, network_device_observer_.get());
1188 } 1193 }
1189 1194
1190 } // namespace chromeos 1195 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/network_library_impl_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698