Index: chromeos/network/network_configuration_handler.cc |
diff --git a/chromeos/network/network_configuration_handler.cc b/chromeos/network/network_configuration_handler.cc |
index 17c691fe0969784ea274a9e8a8e585dc6b5c0517..5741c130103eb5a99f6dd6a70956179268a61ddf 100644 |
--- a/chromeos/network/network_configuration_handler.cc |
+++ b/chromeos/network/network_configuration_handler.cc |
@@ -17,6 +17,7 @@ |
#include "chromeos/dbus/shill_manager_client.h" |
#include "chromeos/dbus/shill_service_client.h" |
#include "dbus/object_path.h" |
+#include "third_party/cros_system_api/dbus/service_constants.h" |
namespace chromeos { |
@@ -193,11 +194,28 @@ void NetworkConfigurationHandler::CreateConfiguration( |
const base::DictionaryValue& properties, |
const network_handler::StringResultCallback& callback, |
const network_handler::ErrorCallback& error_callback) const { |
- DBusThreadManager::Get()->GetShillManagerClient()->GetService( |
- properties, |
- base::Bind(&RunCreateNetworkCallback, callback), |
- base::Bind(&network_handler::ShillErrorCallbackFunction, |
- kLogModule, "", error_callback)); |
+ ShillManagerClient* manager = |
+ DBusThreadManager::Get()->GetShillManagerClient(); |
+ |
+ std::string type; |
+ properties.GetStringWithoutPathExpansion(flimflam::kTypeProperty, &type); |
+ if (type == flimflam::kTypeWifi) { |
+ std::string profile; |
+ properties.GetStringWithoutPathExpansion(flimflam::kProfileProperty, |
+ &profile); |
+ manager->ConfigureServiceForProfile( |
+ dbus::ObjectPath(profile), |
+ properties, |
+ base::Bind(&RunCreateNetworkCallback, callback), |
+ base::Bind(&network_handler::ShillErrorCallbackFunction, |
+ kLogModule, "", error_callback)); |
+ } else { |
+ manager->GetService( |
+ properties, |
+ base::Bind(&RunCreateNetworkCallback, callback), |
+ base::Bind(&network_handler::ShillErrorCallbackFunction, |
+ kLogModule, "", error_callback)); |
+ } |
} |
void NetworkConfigurationHandler::RemoveConfiguration( |