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

Unified Diff: chromeos/network/network_configuration_handler.cc

Issue 12676017: Adding policy support to the new network configuration stack. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove policy initialized flags and wrap PolicyMaps with scoped_ptr. Created 7 years, 8 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
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) {
pastarmovj 2013/04/11 14:46:29 Why is wify so special here? What about other tpye
stevenjb 2013/04/11 18:20:08 +1. Can't we have proxy config for a network in th
pneubeck (no reviews) 2013/04/15 12:16:24 Added a clarifying comment.
pneubeck (no reviews) 2013/04/15 12:16:24 Not sure what this code has to do with proxy, but
stevenjb 2013/04/15 17:38:54 I mentioned 'proxy' only as an example of a non-wi
+ 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(

Powered by Google App Engine
This is Rietveld 408576698