OLD | NEW |
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 "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
9 | 9 |
10 using content::BrowserThread; | 10 using content::BrowserThread; |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 cellular_networks_.swap(disabled_cellular_networks_); | 534 cellular_networks_.swap(disabled_cellular_networks_); |
535 disabled_cellular_networks_.clear(); | 535 disabled_cellular_networks_.clear(); |
536 } | 536 } |
537 enabled_devices_ |= (1 << device); | 537 enabled_devices_ |= (1 << device); |
538 } else { | 538 } else { |
539 if (device == TYPE_WIFI && wifi_enabled()) { | 539 if (device == TYPE_WIFI && wifi_enabled()) { |
540 wifi_networks_.swap(disabled_wifi_networks_); | 540 wifi_networks_.swap(disabled_wifi_networks_); |
541 wifi_networks_.clear(); | 541 wifi_networks_.clear(); |
542 if (active_wifi_) | 542 if (active_wifi_) |
543 DisconnectFromNetwork(active_wifi_); | 543 DisconnectFromNetwork(active_wifi_); |
544 } else if (device == TYPE_WIMAX && wifi_enabled()) { | 544 } else if (device == TYPE_WIMAX && wimax_enabled()) { |
545 wimax_networks_.swap(disabled_wimax_networks_); | 545 wimax_networks_.swap(disabled_wimax_networks_); |
546 wimax_networks_.clear(); | 546 wimax_networks_.clear(); |
547 if (active_wifi_) | 547 if (active_wimax_) |
548 DisconnectFromNetwork(active_wimax_); | 548 DisconnectFromNetwork(active_wimax_); |
549 } else if (device == TYPE_CELLULAR && cellular_enabled()) { | 549 } else if (device == TYPE_CELLULAR && cellular_enabled()) { |
550 cellular_networks_.swap(disabled_cellular_networks_); | 550 cellular_networks_.swap(disabled_cellular_networks_); |
551 cellular_networks_.clear(); | 551 cellular_networks_.clear(); |
552 if (active_cellular_) | 552 if (active_cellular_) |
553 DisconnectFromNetwork(active_cellular_); | 553 DisconnectFromNetwork(active_cellular_); |
554 } | 554 } |
555 enabled_devices_ &= ~(1 << device); | 555 enabled_devices_ &= ~(1 << device); |
556 } | 556 } |
557 SignalNetworkManagerObservers(); | 557 SignalNetworkManagerObservers(); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 HardwareAddressFormat format) { | 663 HardwareAddressFormat format) { |
664 *hardware_address = hardware_address_; | 664 *hardware_address = hardware_address_; |
665 return ip_configs_; | 665 return ip_configs_; |
666 } | 666 } |
667 | 667 |
668 void NetworkLibraryImplStub::SetIPConfig(const NetworkIPConfig& ipconfig) { | 668 void NetworkLibraryImplStub::SetIPConfig(const NetworkIPConfig& ipconfig) { |
669 ip_configs_.push_back(ipconfig); | 669 ip_configs_.push_back(ipconfig); |
670 } | 670 } |
671 | 671 |
672 } // namespace chromeos | 672 } // namespace chromeos |
OLD | NEW |