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

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

Issue 11824046: Detect user initiated network connection failures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix spelling Created 7 years, 11 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_stub.h" 5 #include "chrome/browser/chromeos/cros/network_library_impl_stub.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/chromeos/cros/native_network_constants.h" 9 #include "chrome/browser/chromeos/cros/native_network_constants.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 } 399 }
400 400
401 // Disconnect ethernet when connecting to a new network (for UI testing). 401 // Disconnect ethernet when connecting to a new network (for UI testing).
402 if (IsEthernetEnabled() && network->type() != TYPE_VPN) { 402 if (IsEthernetEnabled() && network->type() != TYPE_VPN) {
403 ethernet_->set_is_active(false); 403 ethernet_->set_is_active(false);
404 ethernet_->set_disconnected(); 404 ethernet_->set_disconnected();
405 } 405 }
406 406
407 // Set connected state. 407 // Set connected state.
408 network->set_connected(); 408 network->set_connected();
409 network->set_connection_started(false); 409 network->set_user_connect_state(USER_CONNECT_CONNECTED);
410 410
411 // Make the connected network the highest priority network. 411 // Make the connected network the highest priority network.
412 // Set all other networks of the same type to disconnected + inactive; 412 // Set all other networks of the same type to disconnected + inactive;
413 int old_priority_order = network->priority_order_; 413 int old_priority_order = network->priority_order_;
414 network->priority_order_ = 0; 414 network->priority_order_ = 0;
415 for (NetworkMap::iterator iter = network_map_.begin(); 415 for (NetworkMap::iterator iter = network_map_.begin();
416 iter != network_map_.end(); ++iter) { 416 iter != network_map_.end(); ++iter) {
417 Network* other = iter->second; 417 Network* other = iter->second;
418 if (other == network) 418 if (other == network)
419 continue; 419 continue;
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 ConnectionTypeToString(network->type())); 740 ConnectionTypeToString(network->type()));
741 dictionary->SetString(flimflam::kNameProperty, network->name()); 741 dictionary->SetString(flimflam::kNameProperty, network->name());
742 dictionary->SetString(flimflam::kGuidProperty, network->unique_id()); 742 dictionary->SetString(flimflam::kGuidProperty, network->unique_id());
743 dictionary->SetString(flimflam::kStateProperty, 743 dictionary->SetString(flimflam::kStateProperty,
744 ConnectionStateToString(network->state())); 744 ConnectionStateToString(network->state()));
745 } 745 }
746 callback.Run(service_path, dictionary.get()); 746 callback.Run(service_path, dictionary.get());
747 } 747 }
748 748
749 } // namespace chromeos 749 } // 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