Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Unified Diff: chromeos/network/network_configuration_handler.h

Issue 708563005: Use setProperties for IP Config. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_430113_internet_options_1
Patch Set: IPConfigType=Static applies to NameServer only config Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..02ed8985d479c86e26c44a11d78c873f17c6096d 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 success this informs
+ // 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_;

Powered by Google App Engine
This is Rietveld 408576698