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

Unified Diff: chromeos/network/network_configuration_handler.cc

Issue 22689003: Use Shill's Manager::ConfigureServiceForProfile for all network types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 4 months 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
« no previous file with comments | « no previous file | chromeos/network/network_configuration_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_configuration_handler.cc
diff --git a/chromeos/network/network_configuration_handler.cc b/chromeos/network/network_configuration_handler.cc
index fbd73c6dc709b3b1e0ec0e123e52c02ceeda3d54..d67d1f1e20fa2819bf6315d52919087e3834dffe 100644
--- a/chromeos/network/network_configuration_handler.cc
+++ b/chromeos/network/network_configuration_handler.cc
@@ -279,29 +279,20 @@ void NetworkConfigurationHandler::CreateConfiguration(
NET_LOG_USER("CreateConfiguration", type);
LogConfigProperties("Configure", type, properties);
- // Shill supports ConfigureServiceForProfile only for network type WiFi. In
- // all other cases, we have to rely on GetService for now. This is
- // unproblematic for VPN (user profile only), but will lead to inconsistencies
- // with WiMax, for example.
- if (type == flimflam::kTypeWifi) {
- std::string profile;
- properties.GetStringWithoutPathExpansion(flimflam::kProfileProperty,
- &profile);
- manager->ConfigureServiceForProfile(
- dbus::ObjectPath(profile),
- properties,
- base::Bind(&NetworkConfigurationHandler::RunCreateNetworkCallback,
- AsWeakPtr(), callback),
- base::Bind(&network_handler::ShillErrorCallbackFunction,
- "Config.CreateConfiguration Failed", "", error_callback));
- } else {
- manager->ConfigureService(
- properties,
- base::Bind(&NetworkConfigurationHandler::RunCreateNetworkCallback,
- AsWeakPtr(), callback),
- base::Bind(&network_handler::ShillErrorCallbackFunction,
- "Config.CreateConfiguration Failed", "", error_callback));
- }
+ std::string profile;
+ properties.GetStringWithoutPathExpansion(flimflam::kProfileProperty,
+ &profile);
+ DCHECK(!profile.empty());
+ manager->ConfigureServiceForProfile(
+ dbus::ObjectPath(profile),
+ properties,
+ base::Bind(&NetworkConfigurationHandler::RunCreateNetworkCallback,
+ AsWeakPtr(),
+ callback),
+ base::Bind(&network_handler::ShillErrorCallbackFunction,
+ "Config.CreateConfiguration Failed",
+ "",
+ error_callback));
}
void NetworkConfigurationHandler::RemoveConfiguration(
« no previous file with comments | « no previous file | chromeos/network/network_configuration_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698