| 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 <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // Changes the profile for the network |service_path| to |profile_path|. | 114 // Changes the profile for the network |service_path| to |profile_path|. |
| 115 // See notes on |source| and callbacks in class description above. | 115 // See notes on |source| and callbacks in class description above. |
| 116 void SetNetworkProfile(const std::string& service_path, | 116 void SetNetworkProfile(const std::string& service_path, |
| 117 const std::string& profile_path, | 117 const std::string& profile_path, |
| 118 NetworkConfigurationObserver::Source source, | 118 NetworkConfigurationObserver::Source source, |
| 119 const base::Closure& callback, | 119 const base::Closure& callback, |
| 120 const network_handler::ErrorCallback& error_callback); | 120 const network_handler::ErrorCallback& error_callback); |
| 121 | 121 |
| 122 // Construct and initialize an instance for testing. | 122 // Construct and initialize an instance for testing. |
| 123 static NetworkConfigurationHandler* InitializeForTest( | 123 static NetworkConfigurationHandler* InitializeForTest( |
| 124 NetworkStateHandler* network_state_handler); | 124 NetworkStateHandler* network_state_handler, |
| 125 NetworkDeviceHandler* network_device_handler); |
| 125 | 126 |
| 126 protected: | 127 protected: |
| 127 friend class ClientCertResolverTest; | 128 friend class ClientCertResolverTest; |
| 128 friend class NetworkHandler; | 129 friend class NetworkHandler; |
| 129 friend class NetworkConfigurationHandlerTest; | 130 friend class NetworkConfigurationHandlerTest; |
| 130 friend class NetworkConfigurationHandlerStubTest; | 131 friend class NetworkConfigurationHandlerStubTest; |
| 131 class ProfileEntryDeleter; | 132 class ProfileEntryDeleter; |
| 132 | 133 |
| 133 NetworkConfigurationHandler(); | 134 NetworkConfigurationHandler(); |
| 134 void Init(NetworkStateHandler* network_state_handler); | 135 void Init(NetworkStateHandler* network_state_handler, |
| 136 NetworkDeviceHandler* network_device_handler); |
| 135 | 137 |
| 136 void RunCreateNetworkCallback( | 138 void RunCreateNetworkCallback( |
| 137 const std::string& profile_path, | 139 const std::string& profile_path, |
| 138 NetworkConfigurationObserver::Source source, | 140 NetworkConfigurationObserver::Source source, |
| 139 scoped_ptr<base::DictionaryValue> configure_properties, | 141 scoped_ptr<base::DictionaryValue> configure_properties, |
| 140 const network_handler::StringResultCallback& callback, | 142 const network_handler::StringResultCallback& callback, |
| 141 const dbus::ObjectPath& service_path); | 143 const dbus::ObjectPath& service_path); |
| 142 | 144 |
| 143 // Called from ProfileEntryDeleter instances when they complete causing | 145 // Called from ProfileEntryDeleter instances when they complete causing |
| 144 // this class to delete the instance. | 146 // this class to delete the instance. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 175 const std::string& service_path, | 177 const std::string& service_path, |
| 176 const std::vector<std::string>& names, | 178 const std::vector<std::string>& names, |
| 177 const base::Closure& callback, | 179 const base::Closure& callback, |
| 178 const base::ListValue& result); | 180 const base::ListValue& result); |
| 179 void ClearPropertiesErrorCallback( | 181 void ClearPropertiesErrorCallback( |
| 180 const std::string& service_path, | 182 const std::string& service_path, |
| 181 const network_handler::ErrorCallback& error_callback, | 183 const network_handler::ErrorCallback& error_callback, |
| 182 const std::string& dbus_error_name, | 184 const std::string& dbus_error_name, |
| 183 const std::string& dbus_error_message); | 185 const std::string& dbus_error_message); |
| 184 | 186 |
| 185 // Unowned associated NetworkStateHandler* (global or test instance). | 187 // Signals the device handler to request an IP config refresh. |
| 188 void RequestRefreshIPConfigs(const std::string& service_path); |
| 189 |
| 190 // Unowned associated Network*Handlers (global or test instance). |
| 186 NetworkStateHandler* network_state_handler_; | 191 NetworkStateHandler* network_state_handler_; |
| 192 NetworkDeviceHandler* network_device_handler_; |
| 187 | 193 |
| 188 // Map of in-progress deleter instances. Owned by this class. | 194 // Map of in-progress deleter instances. Owned by this class. |
| 189 std::map<std::string, ProfileEntryDeleter*> profile_entry_deleters_; | 195 std::map<std::string, ProfileEntryDeleter*> profile_entry_deleters_; |
| 190 | 196 |
| 191 ObserverList<NetworkConfigurationObserver> observers_; | 197 ObserverList<NetworkConfigurationObserver> observers_; |
| 192 | 198 |
| 193 DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationHandler); | 199 DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationHandler); |
| 194 }; | 200 }; |
| 195 | 201 |
| 196 } // namespace chromeos | 202 } // namespace chromeos |
| 197 | 203 |
| 198 #endif // CHROMEOS_NETWORK_NETWORK_CONFIGURATION_HANDLER_H_ | 204 #endif // CHROMEOS_NETWORK_NETWORK_CONFIGURATION_HANDLER_H_ |
| OLD | NEW |