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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 } | 135 } |
136 | 136 |
137 if (network->type() == shill::kTypeWifi) { | 137 if (network->type() == shill::kTypeWifi) { |
138 // Only show the config view for secure networks, otherwise do nothing. | 138 // Only show the config view for secure networks, otherwise do nothing. |
139 if (network->security_class() != shill::kSecurityNone) { | 139 if (network->security_class() != shill::kSecurityNone) { |
140 delegate_->ShowNetworkConfigure(service_path); | 140 delegate_->ShowNetworkConfigure(service_path); |
141 } | 141 } |
142 return; | 142 return; |
143 } | 143 } |
144 | 144 |
145 if (network->type() == shill::kTypeWimax || | 145 if (network->type() == shill::kTypeWimax) { |
146 network->type() == shill::kTypeVPN) { | |
147 delegate_->ShowNetworkConfigure(service_path); | 146 delegate_->ShowNetworkConfigure(service_path); |
148 return; | 147 return; |
149 } | 148 } |
150 | 149 |
| 150 if (network->type() == shill::kTypeVPN) { |
| 151 // Third-party VPNs handle configuration UI themselves. |
| 152 if (network->vpn_provider_type() != shill::kProviderThirdPartyVpn) |
| 153 delegate_->ShowNetworkConfigure(service_path); |
| 154 return; |
| 155 } |
| 156 |
151 if (network->type() == shill::kTypeCellular) { | 157 if (network->type() == shill::kTypeCellular) { |
152 if (network->RequiresActivation()) { | 158 if (network->RequiresActivation()) { |
153 ActivateCellular(service_path); | 159 ActivateCellular(service_path); |
154 return; | 160 return; |
155 } | 161 } |
156 if (network->cellular_out_of_credits()) { | 162 if (network->cellular_out_of_credits()) { |
157 ShowMobileSetup(service_path); | 163 ShowMobileSetup(service_path); |
158 return; | 164 return; |
159 } | 165 } |
160 // No special configure or setup for |network|, show the settings UI. | 166 // No special configure or setup for |network|, show the settings UI. |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 return g_network_connect; | 645 return g_network_connect; |
640 } | 646 } |
641 | 647 |
642 NetworkConnect::NetworkConnect() { | 648 NetworkConnect::NetworkConnect() { |
643 } | 649 } |
644 | 650 |
645 NetworkConnect::~NetworkConnect() { | 651 NetworkConnect::~NetworkConnect() { |
646 } | 652 } |
647 | 653 |
648 } // namespace ui | 654 } // namespace ui |
OLD | NEW |