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

Unified Diff: chrome/browser/chromeos/cros/network_library.cc

Issue 8759014: Add ONC VPN support for OpenVPN and L2TP/IPsec VPNs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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: 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);
}

Powered by Google App Engine
This is Rietveld 408576698