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 "chrome/browser/chromeos/options/network_connect.h" | 5 #include "chrome/browser/chromeos/options/network_connect.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
9 #include "ash/system/chromeos/network/network_connect.h" | 9 #include "ash/system/chromeos/network/network_connect.h" |
10 #include "ash/system/chromeos/network/network_observer.h" | 10 #include "ash/system/chromeos/network/network_observer.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 void HandleUnconfiguredNetwork(const std::string& service_path, | 98 void HandleUnconfiguredNetwork(const std::string& service_path, |
99 gfx::NativeWindow parent_window) { | 99 gfx::NativeWindow parent_window) { |
100 const NetworkState* network = NetworkHandler::Get()->network_state_handler()-> | 100 const NetworkState* network = NetworkHandler::Get()->network_state_handler()-> |
101 GetNetworkState(service_path); | 101 GetNetworkState(service_path); |
102 if (!network) { | 102 if (!network) { |
103 NET_LOG_ERROR("Configuring unknown network", service_path); | 103 NET_LOG_ERROR("Configuring unknown network", service_path); |
104 return; | 104 return; |
105 } | 105 } |
106 | 106 |
107 if (network->type() == flimflam::kTypeWifi || | 107 if (network->type() == flimflam::kTypeWifi) { |
108 network->type() == flimflam::kTypeWimax || | 108 // Only show the config view for secure networks, otherwise do nothing. |
| 109 if (network->security() != flimflam::kSecurityNone) |
| 110 NetworkConfigView::Show(service_path, parent_window); |
| 111 return; |
| 112 } |
| 113 |
| 114 if (network->type() == flimflam::kTypeWimax || |
109 network->type() == flimflam::kTypeVPN) { | 115 network->type() == flimflam::kTypeVPN) { |
110 NetworkConfigView::Show(service_path, parent_window); | 116 NetworkConfigView::Show(service_path, parent_window); |
111 return; | 117 return; |
112 } | 118 } |
113 | 119 |
114 if (network->type() == flimflam::kTypeCellular) { | 120 if (network->type() == flimflam::kTypeCellular) { |
115 if (network->activation_state() != flimflam::kActivationStateActivated) { | 121 if (network->activation_state() != flimflam::kActivationStateActivated) { |
116 ash::network_connect::ActivateCellular(service_path); | 122 ash::network_connect::ActivateCellular(service_path); |
117 return; | 123 return; |
118 } | 124 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 const NetworkState* network, | 163 const NetworkState* network, |
158 onc::ONCSource* onc_source) { | 164 onc::ONCSource* onc_source) { |
159 const User* user = UserManager::Get()->GetActiveUser(); | 165 const User* user = UserManager::Get()->GetActiveUser(); |
160 std::string username_hash = user ? user->username_hash() : std::string(); | 166 std::string username_hash = user ? user->username_hash() : std::string(); |
161 return NetworkHandler::Get()->managed_network_configuration_handler()-> | 167 return NetworkHandler::Get()->managed_network_configuration_handler()-> |
162 FindPolicyByGUID(username_hash, network->guid(), onc_source); | 168 FindPolicyByGUID(username_hash, network->guid(), onc_source); |
163 } | 169 } |
164 | 170 |
165 } // namespace network_connect | 171 } // namespace network_connect |
166 } // namespace chromeos | 172 } // namespace chromeos |
OLD | NEW |