| 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)
|
| @@ -323,10 +323,12 @@
|
| it != dict->end_keys(); ++it) {
|
| std::string key = *it;
|
| Value* val = NULL;
|
| - if (dict->Get(key, &val)) {
|
| + if (dict->GetWithoutPathExpansion(key, &val)) {
|
| g_hash_table_insert(ghash,
|
| g_strdup(const_cast<char*>(key.c_str())),
|
| ConvertValueToGValue(val));
|
| + } else {
|
| + VLOG(2) << "Could not insert key " << key << " into hash";
|
| }
|
| }
|
| return ghash;
|
| @@ -421,6 +423,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 +818,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_);
|
| @@ -2832,7 +2845,7 @@
|
| // Parse Open Network Configuration blob into a temporary Network object.
|
| scoped_ptr<Network> network(parser.ParseNetwork(i));
|
| if (!network.get()) {
|
| - DLOG(WARNING) << "Cannot parse networks in ONC file";
|
| + DLOG(WARNING) << "Cannot parse network in ONC file";
|
| return false;
|
| }
|
|
|
| @@ -2844,6 +2857,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 +3703,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);
|
| }
|
|
|