Index: chrome/browser/chromeos/cros/network_library.cc |
=================================================================== |
--- chrome/browser/chromeos/cros/network_library.cc (revision 112277) |
+++ chrome/browser/chromeos/cros/network_library.cc (working copy) |
@@ -421,6 +421,16 @@ |
} |
} |
+bool Network::GetProperty(PropertyIndex index, |
+ const base::Value** value) const { |
+ PropertyMap::const_iterator i = property_map_.find(index); |
+ if (i == property_map_.end()) |
+ return false; |
+ if (value != NULL) |
+ *value = i->second; |
+ return true; |
+} |
+ |
void Network::SetState(ConnectionState new_state) { |
if (new_state == state_) |
return; |
@@ -806,6 +816,7 @@ |
const std::string& username, |
const std::string& user_passphrase, |
const std::string& otp) { |
+ // TODO(kmixter): Are we missing setting the CaCert property? |
SetStringProperty(flimflam::kOpenVPNClientCertIdProperty, |
client_cert_id, &client_cert_id_); |
SetStringProperty(flimflam::kOpenVPNUserProperty, username, &username_); |
@@ -2844,6 +2855,8 @@ |
NativeNetworkParser::property_mapper()->GetKey(props->first); |
if (!key.empty()) |
dict.SetWithoutPathExpansion(key, props->second->DeepCopy()); |
+ else |
+ VLOG(2) << "Property " << props->first << " will not be sent"; |
} |
CallConfigureService(network->unique_id(), &dict); |
@@ -3688,6 +3701,12 @@ |
void NetworkLibraryImplCros::CallConfigureService(const std::string& identifier, |
const DictionaryValue* info) { |
GHashTable* ghash = ConvertDictionaryValueToGValueMap(info); |
+ if (VLOG_IS_ON(2)) { |
+ scoped_ptr<DictionaryValue> dict(ConvertGHashTable(ghash)); |
+ std::string dict_json; |
+ base::JSONWriter::Write(static_cast<Value*>(dict.get()), true, &dict_json); |
+ VLOG(2) << "ConfigureService will be called on:" << dict_json; |
+ } |
chromeos::ConfigureService(identifier.c_str(), ghash, |
ConfigureServiceCallback, this); |
} |