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

Unified Diff: chromeos/network/managed_network_configuration_handler_impl.cc

Issue 821643005: Provide GUID in ONC for all networks in ManagedNetworkConfigurationHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ONC merger Created 5 years, 11 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/managed_network_configuration_handler_impl.cc
diff --git a/chromeos/network/managed_network_configuration_handler_impl.cc b/chromeos/network/managed_network_configuration_handler_impl.cc
index e750dda3d4c77ddd62db079f4bc85212dd896d9b..aead3f14cd650ffdba015f9f3aee1fbed8479f7b 100644
--- a/chromeos/network/managed_network_configuration_handler_impl.cc
+++ b/chromeos/network/managed_network_configuration_handler_impl.cc
@@ -739,6 +739,23 @@ void ManagedNetworkConfigurationHandlerImpl::GetPropertiesCallback(
scoped_ptr<base::DictionaryValue> shill_properties_copy(
shill_properties.DeepCopy());
+ std::string guid;
+ shill_properties.GetStringWithoutPathExpansion(shill::kGuidProperty, &guid);
+ if (guid.empty()) {
+ // Unmanaged networks are assigned a GUID in NetworkState. Provide this
+ // value in the ONC dictionary.
+ const NetworkState* state =
+ network_state_handler_->GetNetworkState(service_path);
+ if (state && !state->guid().empty()) {
+ guid = state->guid();
pneubeck (no reviews) 2015/01/14 17:47:10 nit: inlining this is clearer as the original valu
stevenjb 2015/01/14 18:07:44 I'm not sure I agree. Currently guid is unused, bu
pneubeck (no reviews) 2015/01/15 09:45:12 sounds ok.
+ shill_properties_copy->SetStringWithoutPathExpansion(shill::kGuidProperty,
+ guid);
+ } else {
+ LOG(ERROR) << "Network has no GUID specified: " << service_path;
+ }
+ }
+
+
std::string type;
shill_properties_copy->GetStringWithoutPathExpansion(shill::kTypeProperty,
&type);

Powered by Google App Engine
This is Rietveld 408576698