Chromium Code Reviews| Index: chromeos/network/network_configuration_handler.h |
| diff --git a/chromeos/network/network_configuration_handler.h b/chromeos/network/network_configuration_handler.h |
| index 7465876b2a198f53883b63d6a894edd3b037c5f8..8e1446f021a816ec31ccdd325685c4af9b01b6c6 100644 |
| --- a/chromeos/network/network_configuration_handler.h |
| +++ b/chromeos/network/network_configuration_handler.h |
| @@ -121,7 +121,8 @@ class CHROMEOS_EXPORT NetworkConfigurationHandler |
| // Construct and initialize an instance for testing. |
| static NetworkConfigurationHandler* InitializeForTest( |
| - NetworkStateHandler* network_state_handler); |
| + NetworkStateHandler* network_state_handler, |
| + NetworkDeviceHandler* network_device_handler); |
| protected: |
| friend class ClientCertResolverTest; |
| @@ -131,7 +132,8 @@ class CHROMEOS_EXPORT NetworkConfigurationHandler |
| class ProfileEntryDeleter; |
| NetworkConfigurationHandler(); |
| - void Init(NetworkStateHandler* network_state_handler); |
| + void Init(NetworkStateHandler* network_state_handler, |
| + NetworkDeviceHandler* network_device_handler); |
| void RunCreateNetworkCallback( |
| const std::string& profile_path, |
| @@ -156,11 +158,21 @@ class CHROMEOS_EXPORT NetworkConfigurationHandler |
| NetworkConfigurationObserver::Source source, |
| const base::Closure& callback); |
| + // Helper method to send the SetProperties request to Shill. Called either |
| + // directly from SetProperties, or after ClearProperties completes. |
| + void SendSetPropertiesToShill( |
| + const std::string& service_path, |
| + scoped_ptr<base::DictionaryValue> changed_properties, |
| + scoped_ptr<base::DictionaryValue> properties_to_set, |
| + NetworkConfigurationObserver::Source source, |
| + const base::Closure& callback, |
| + const network_handler::ErrorCallback& error_callback); |
| + |
| // Invoke the callback and inform NetworkStateHandler to request an update |
| // for the service after setting properties. |
| void SetPropertiesSuccessCallback( |
| const std::string& service_path, |
| - scoped_ptr<base::DictionaryValue> set_properties, |
| + scoped_ptr<base::DictionaryValue> changed_properties, |
| NetworkConfigurationObserver::Source source, |
| const base::Closure& callback); |
| void SetPropertiesErrorCallback( |
| @@ -169,8 +181,16 @@ class CHROMEOS_EXPORT NetworkConfigurationHandler |
| const std::string& dbus_error_name, |
| const std::string& dbus_error_message); |
| - // Invoke the callback and inform NetworkStateHandler to request an update |
| - // for the service after clearing properties. |
| + // Callbacks supporting ClearProperties. First the current properties are |
| + // requested so that only set properties are cleared. On succes this informs |
|
pneubeck (no reviews)
2014/11/25 21:13:34
typo: succes -> success
stevenjb
2014/11/25 21:59:47
Done.
|
| + // NetworkStateHandler to request an update for the service. |
| + void ClearPropertiesGetCallback( |
| + const std::string& service_path, |
| + const std::vector<std::string>& names, |
| + const base::Closure& callback, |
| + const network_handler::ErrorCallback& error_callback, |
| + DBusMethodCallStatus call_status, |
| + const base::DictionaryValue& properties); |
| void ClearPropertiesSuccessCallback( |
| const std::string& service_path, |
| const std::vector<std::string>& names, |
| @@ -182,8 +202,12 @@ class CHROMEOS_EXPORT NetworkConfigurationHandler |
| const std::string& dbus_error_name, |
| const std::string& dbus_error_message); |
| - // Unowned associated NetworkStateHandler* (global or test instance). |
| + // Signals the device handler to request an IP config refresh. |
| + void RequestRefreshIPConfigs(const std::string& service_path); |
| + |
| + // Unowned associated Network*Handlers (global or test instance). |
| NetworkStateHandler* network_state_handler_; |
| + NetworkDeviceHandler* network_device_handler_; |
| // Map of in-progress deleter instances. Owned by this class. |
| std::map<std::string, ProfileEntryDeleter*> profile_entry_deleters_; |