| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_AUTO_CONNECT_HANDLER_H_ | 5 #ifndef CHROMEOS_NETWORK_AUTO_CONNECT_HANDLER_H_ |
| 6 #define CHROMEOS_NETWORK_AUTO_CONNECT_HANDLER_H_ | 6 #define CHROMEOS_NETWORK_AUTO_CONNECT_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 void Init(ClientCertResolver* client_cert_resolver, | 52 void Init(ClientCertResolver* client_cert_resolver, |
| 53 NetworkConnectionHandler* network_connection_handler, | 53 NetworkConnectionHandler* network_connection_handler, |
| 54 NetworkStateHandler* network_state_handler, | 54 NetworkStateHandler* network_state_handler, |
| 55 ManagedNetworkConfigurationHandler* | 55 ManagedNetworkConfigurationHandler* |
| 56 managed_network_configuration_handler); | 56 managed_network_configuration_handler); |
| 57 | 57 |
| 58 // If the user logged in already and the policy to prevent unmanaged & shared | 58 // If the user logged in already and the policy to prevent unmanaged & shared |
| 59 // networks to autoconnect is enabled, then disconnects all such networks | 59 // networks to autoconnect is enabled, then disconnects all such networks |
| 60 // except wired networks. It will do this only once after the user logged in | 60 // except wired networks. It will do this only once after the user logged in |
| 61 // and the device policy was available. | 61 // and the device policy and user policy was available. |
| 62 // This is enforced once after a user logs in 1) to allow mananged networks to | 62 // This is enforced once after a user logs in 1) to allow mananged networks to |
| 63 // autoconnect and 2) to prevent a previous user from foisting a network on | 63 // autoconnect and 2) to prevent a previous user from foisting a network on |
| 64 // the new user. Therefore, this function is called at login and when the | 64 // the new user. Therefore, this function is called at login and when the |
| 65 // device policy is changed. | 65 // device policy is changed after user policy is fetched and applied. |
| 66 void DisconnectIfPolicyRequires(); | 66 void DisconnectIfPolicyRequires(); |
| 67 | 67 |
| 68 // Disconnects from all unmanaged and shared WiFi networks that are currently | 68 // Disconnects from all unmanaged and shared WiFi networks that are currently |
| 69 // connected or connecting. | 69 // connected or connecting. |
| 70 void DisconnectFromUnmanagedSharedWiFiNetworks(); | 70 void DisconnectFromUnmanagedSharedWiFiNetworks(); |
| 71 | 71 |
| 72 // Requests and if possible connects to the 'best' available network, see | 72 // Requests and if possible connects to the 'best' available network, see |
| 73 // CheckBestConnection(). | 73 // CheckBestConnection(). |
| 74 void RequestBestConnection(); | 74 void RequestBestConnection(); |
| 75 | 75 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 bool connect_to_best_services_after_scan_; | 113 bool connect_to_best_services_after_scan_; |
| 114 | 114 |
| 115 base::WeakPtrFactory<AutoConnectHandler> weak_ptr_factory_; | 115 base::WeakPtrFactory<AutoConnectHandler> weak_ptr_factory_; |
| 116 | 116 |
| 117 DISALLOW_COPY_AND_ASSIGN(AutoConnectHandler); | 117 DISALLOW_COPY_AND_ASSIGN(AutoConnectHandler); |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 } // namespace chromeos | 120 } // namespace chromeos |
| 121 | 121 |
| 122 #endif // CHROMEOS_NETWORK_AUTO_CONNECT_HANDLER_H_ | 122 #endif // CHROMEOS_NETWORK_AUTO_CONNECT_HANDLER_H_ |
| OLD | NEW |