| 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_CONFIGURATION_HANDLER_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_CONFIGURATION_HANDLER_H_ |
| 6 #define CHROMEOS_NETWORK_NETWORK_CONFIGURATION_HANDLER_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_CONFIGURATION_HANDLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 const network_handler::ErrorCallback& error_callback); | 108 const network_handler::ErrorCallback& error_callback); |
| 109 | 109 |
| 110 // Removes the network |service_path| from any profiles that include it. | 110 // Removes the network |service_path| from any profiles that include it. |
| 111 // See notes on |source| and callbacks in class description above. | 111 // See notes on |source| and callbacks in class description above. |
| 112 void RemoveConfiguration( | 112 void RemoveConfiguration( |
| 113 const std::string& service_path, | 113 const std::string& service_path, |
| 114 NetworkConfigurationObserver::Source source, | 114 NetworkConfigurationObserver::Source source, |
| 115 const base::Closure& callback, | 115 const base::Closure& callback, |
| 116 const network_handler::ErrorCallback& error_callback); | 116 const network_handler::ErrorCallback& error_callback); |
| 117 | 117 |
| 118 // Removes the network |service_path| from the profile that contains its |
| 119 // currently active configuration. |
| 120 // See notes on |source| and callbacks in class description above. |
| 121 void RemoveConfigurationFromCurrentProfile( |
| 122 const std::string& service_path, |
| 123 NetworkConfigurationObserver::Source source, |
| 124 const base::Closure& callback, |
| 125 const network_handler::ErrorCallback& error_callback); |
| 126 |
| 118 // Changes the profile for the network |service_path| to |profile_path|. | 127 // Changes the profile for the network |service_path| to |profile_path|. |
| 119 // See notes on |source| and callbacks in class description above. | 128 // See notes on |source| and callbacks in class description above. |
| 120 void SetNetworkProfile(const std::string& service_path, | 129 void SetNetworkProfile(const std::string& service_path, |
| 121 const std::string& profile_path, | 130 const std::string& profile_path, |
| 122 NetworkConfigurationObserver::Source source, | 131 NetworkConfigurationObserver::Source source, |
| 123 const base::Closure& callback, | 132 const base::Closure& callback, |
| 124 const network_handler::ErrorCallback& error_callback); | 133 const network_handler::ErrorCallback& error_callback); |
| 125 | 134 |
| 126 // NetworkStateHandlerObserver | 135 // NetworkStateHandlerObserver |
| 127 void NetworkListChanged() override; | 136 void NetworkListChanged() override; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 const base::ListValue& result); | 207 const base::ListValue& result); |
| 199 void ClearPropertiesErrorCallback( | 208 void ClearPropertiesErrorCallback( |
| 200 const std::string& service_path, | 209 const std::string& service_path, |
| 201 const network_handler::ErrorCallback& error_callback, | 210 const network_handler::ErrorCallback& error_callback, |
| 202 const std::string& dbus_error_name, | 211 const std::string& dbus_error_name, |
| 203 const std::string& dbus_error_message); | 212 const std::string& dbus_error_message); |
| 204 | 213 |
| 205 // Signals the device handler to request an IP config refresh. | 214 // Signals the device handler to request an IP config refresh. |
| 206 void RequestRefreshIPConfigs(const std::string& service_path); | 215 void RequestRefreshIPConfigs(const std::string& service_path); |
| 207 | 216 |
| 217 // Removes network configuration for |service_path| from the profile specified |
| 218 // by |profile_path|. If |profile_path| is not set, the network is removed |
| 219 // from all the profiles that include it. |
| 220 void RemoveConfigurationFromProfile( |
| 221 const std::string& service_path, |
| 222 const std::string& profile_path, |
| 223 NetworkConfigurationObserver::Source source, |
| 224 const base::Closure& callback, |
| 225 const network_handler::ErrorCallback& error_callback); |
| 226 |
| 208 // Unowned associated Network*Handlers (global or test instance). | 227 // Unowned associated Network*Handlers (global or test instance). |
| 209 NetworkStateHandler* network_state_handler_; | 228 NetworkStateHandler* network_state_handler_; |
| 210 NetworkDeviceHandler* network_device_handler_; | 229 NetworkDeviceHandler* network_device_handler_; |
| 211 | 230 |
| 212 // Map of in-progress deleter instances. | 231 // Map of in-progress deleter instances. |
| 213 std::map<std::string, std::unique_ptr<ProfileEntryDeleter>> | 232 std::map<std::string, std::unique_ptr<ProfileEntryDeleter>> |
| 214 profile_entry_deleters_; | 233 profile_entry_deleters_; |
| 215 | 234 |
| 216 // Map of configuration callbacks to run once the service becomes available | 235 // Map of configuration callbacks to run once the service becomes available |
| 217 // in the NetworkStateHandler cache. | 236 // in the NetworkStateHandler cache. |
| 218 std::map<std::string, network_handler::ServiceResultCallback> | 237 std::map<std::string, network_handler::ServiceResultCallback> |
| 219 configure_callbacks_; | 238 configure_callbacks_; |
| 220 | 239 |
| 221 base::ObserverList<NetworkConfigurationObserver, true> observers_; | 240 base::ObserverList<NetworkConfigurationObserver, true> observers_; |
| 222 | 241 |
| 223 base::WeakPtrFactory<NetworkConfigurationHandler> weak_ptr_factory_; | 242 base::WeakPtrFactory<NetworkConfigurationHandler> weak_ptr_factory_; |
| 224 | 243 |
| 225 DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationHandler); | 244 DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationHandler); |
| 226 }; | 245 }; |
| 227 | 246 |
| 228 } // namespace chromeos | 247 } // namespace chromeos |
| 229 | 248 |
| 230 #endif // CHROMEOS_NETWORK_NETWORK_CONFIGURATION_HANDLER_H_ | 249 #endif // CHROMEOS_NETWORK_NETWORK_CONFIGURATION_HANDLER_H_ |
| OLD | NEW |