| 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 #ifndef CHROMEOS_NETWORK_NETWORK_CONNECTION_HANDLER_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_CONNECTION_HANDLER_H_ |
| 6 #define CHROMEOS_NETWORK_NETWORK_CONNECTION_HANDLER_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_CONNECTION_HANDLER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 // If the policy to prevent unmanaged & shared networks to autoconnect is | 209 // If the policy to prevent unmanaged & shared networks to autoconnect is |
| 210 // enabled, then disconnect all such networks except wired networks. Does | 210 // enabled, then disconnect all such networks except wired networks. Does |
| 211 // nothing on consecutive calls. | 211 // nothing on consecutive calls. |
| 212 // This is enforced once after a user logs in 1) to allow mananged networks to | 212 // This is enforced once after a user logs in 1) to allow mananged networks to |
| 213 // autoconnect and 2) to prevent a previous user from foisting a network on | 213 // autoconnect and 2) to prevent a previous user from foisting a network on |
| 214 // the new user. Therefore, this function is called on startup, at login and | 214 // the new user. Therefore, this function is called on startup, at login and |
| 215 // when the device policy is changed. | 215 // when the device policy is changed. |
| 216 void DisconnectIfPolicyRequires(); | 216 void DisconnectIfPolicyRequires(); |
| 217 | 217 |
| 218 // Disconnects from all unmanaged and shared WiFi networks that are currently |
| 219 // connected or connecting. |
| 220 void DisconnectFromUnmanagedSharedWiFiNetworks(); |
| 221 |
| 218 // Requests a connect to the 'best' available network once after login and | 222 // Requests a connect to the 'best' available network once after login and |
| 219 // after any disconnect required by policy is executed (see | 223 // after any disconnect required by policy is executed (see |
| 220 // DisconnectIfPolicyRequires()). To include networks with client | 224 // DisconnectIfPolicyRequires()). To include networks with client |
| 221 // certificates, no request is sent until certificates are loaded. Therefore, | 225 // certificates, no request is sent until certificates are loaded. Therefore, |
| 222 // this function is called on the initial certificate load and by | 226 // this function is called on the initial certificate load and by |
| 223 // DisconnectIfPolicyRequires(). | 227 // DisconnectIfPolicyRequires(). |
| 224 void ConnectToBestNetworkAfterLogin(); | 228 void ConnectToBestNetworkAfterLogin(); |
| 225 | 229 |
| 226 // Local references to the associated handler instances. | 230 // Local references to the associated handler instances. |
| 227 CertLoader* cert_loader_; | 231 CertLoader* cert_loader_; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 246 // Whether the handler already requested a 'ConnectToBestNetwork' after login, | 250 // Whether the handler already requested a 'ConnectToBestNetwork' after login, |
| 247 // see ConnectToBestNetworkAfterLogin(). | 251 // see ConnectToBestNetworkAfterLogin(). |
| 248 bool requested_connect_to_best_network_; | 252 bool requested_connect_to_best_network_; |
| 249 | 253 |
| 250 DISALLOW_COPY_AND_ASSIGN(NetworkConnectionHandler); | 254 DISALLOW_COPY_AND_ASSIGN(NetworkConnectionHandler); |
| 251 }; | 255 }; |
| 252 | 256 |
| 253 } // namespace chromeos | 257 } // namespace chromeos |
| 254 | 258 |
| 255 #endif // CHROMEOS_NETWORK_NETWORK_CONNECTION_HANDLER_H_ | 259 #endif // CHROMEOS_NETWORK_NETWORK_CONNECTION_HANDLER_H_ |
| OLD | NEW |