| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ui/chromeos/network/network_connect.h" | 5 #include "ui/chromeos/network/network_connect.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 const std::string& service_path) { | 137 const std::string& service_path) { |
| 138 const NetworkState* network = GetNetworkState(service_path); | 138 const NetworkState* network = GetNetworkState(service_path); |
| 139 if (!network) { | 139 if (!network) { |
| 140 NET_LOG_ERROR("Configuring unknown network", service_path); | 140 NET_LOG_ERROR("Configuring unknown network", service_path); |
| 141 return; | 141 return; |
| 142 } | 142 } |
| 143 | 143 |
| 144 if (network->type() == shill::kTypeWifi) { | 144 if (network->type() == shill::kTypeWifi) { |
| 145 // Only show the config view for secure networks, otherwise do nothing. | 145 // Only show the config view for secure networks, otherwise do nothing. |
| 146 if (network->security_class() != shill::kSecurityNone) { | 146 if (network->security_class() != shill::kSecurityNone) { |
| 147 delegate_->ShowNetworkConfigure(service_path); | 147 delegate_->ShowNetworkConfigure(network->guid()); |
| 148 } | 148 } |
| 149 return; | 149 return; |
| 150 } | 150 } |
| 151 | 151 |
| 152 if (network->type() == shill::kTypeWimax) { | 152 if (network->type() == shill::kTypeWimax) { |
| 153 delegate_->ShowNetworkConfigure(service_path); | 153 delegate_->ShowNetworkConfigure(network->guid()); |
| 154 return; | 154 return; |
| 155 } | 155 } |
| 156 | 156 |
| 157 if (network->type() == shill::kTypeVPN) { | 157 if (network->type() == shill::kTypeVPN) { |
| 158 // Third-party VPNs handle configuration UI themselves. | 158 // Third-party VPNs handle configuration UI themselves. |
| 159 if (network->vpn_provider_type() != shill::kProviderThirdPartyVpn) | 159 if (network->vpn_provider_type() != shill::kProviderThirdPartyVpn) |
| 160 delegate_->ShowNetworkConfigure(service_path); | 160 delegate_->ShowNetworkConfigure(network->guid()); |
| 161 return; | 161 return; |
| 162 } | 162 } |
| 163 | 163 |
| 164 if (network->type() == shill::kTypeCellular) { | 164 if (network->type() == shill::kTypeCellular) { |
| 165 if (network->RequiresActivation()) { | 165 if (network->RequiresActivation()) { |
| 166 ActivateCellular(service_path); | 166 ActivateCellular(service_path); |
| 167 return; | 167 return; |
| 168 } | 168 } |
| 169 if (network->cellular_out_of_credits()) { | 169 if (network->cellular_out_of_credits()) { |
| 170 ShowMobileSetup(service_path); | 170 ShowMobileSetup(service_path); |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 return g_network_connect; | 652 return g_network_connect; |
| 653 } | 653 } |
| 654 | 654 |
| 655 NetworkConnect::NetworkConnect() { | 655 NetworkConnect::NetworkConnect() { |
| 656 } | 656 } |
| 657 | 657 |
| 658 NetworkConnect::~NetworkConnect() { | 658 NetworkConnect::~NetworkConnect() { |
| 659 } | 659 } |
| 660 | 660 |
| 661 } // namespace ui | 661 } // namespace ui |
| OLD | NEW |