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 are supposed to do the UI itself. | |
stevenjb
2015/03/26 15:38:02
nit: Third-party VPNs handle configuration UI them
| |
152 if (network->vpn_provider_type() != shill::kProviderThirdPartyVpn) { | |
153 delegate_->ShowNetworkConfigure(service_path); | |
154 } | |
stevenjb
2015/03/26 15:38:02
nit: no brackets
| |
155 return; | |
156 } | |
157 | |
151 if (network->type() == shill::kTypeCellular) { | 158 if (network->type() == shill::kTypeCellular) { |
152 if (network->RequiresActivation()) { | 159 if (network->RequiresActivation()) { |
153 ActivateCellular(service_path); | 160 ActivateCellular(service_path); |
154 return; | 161 return; |
155 } | 162 } |
156 if (network->cellular_out_of_credits()) { | 163 if (network->cellular_out_of_credits()) { |
157 ShowMobileSetup(service_path); | 164 ShowMobileSetup(service_path); |
158 return; | 165 return; |
159 } | 166 } |
160 // No special configure or setup for |network|, show the settings UI. | 167 // 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; | 646 return g_network_connect; |
640 } | 647 } |
641 | 648 |
642 NetworkConnect::NetworkConnect() { | 649 NetworkConnect::NetworkConnect() { |
643 } | 650 } |
644 | 651 |
645 NetworkConnect::~NetworkConnect() { | 652 NetworkConnect::~NetworkConnect() { |
646 } | 653 } |
647 | 654 |
648 } // namespace ui | 655 } // namespace ui |
OLD | NEW |