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

Unified Diff: chrome/browser/chromeos/options/vpn_config_view.cc

Issue 559543002: Don't clear CA cert when configuring an existing VPN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/options/vpn_config_view.cc
diff --git a/chrome/browser/chromeos/options/vpn_config_view.cc b/chrome/browser/chromeos/options/vpn_config_view.cc
index c1da90b7b239771659281f43c9f5858a0f26287b..b5140f3e8977446c81c19dc9f68c0caad86dcae7 100644
--- a/chrome/browser/chromeos/options/vpn_config_view.cc
+++ b/chrome/browser/chromeos/options/vpn_config_view.cc
@@ -834,12 +834,14 @@ void VPNConfigView::SetConfigProperties(
break;
}
case PROVIDER_TYPE_INDEX_L2TP_IPSEC_USER_CERT: {
- std::string ca_cert_pem = GetServerCACertPEM();
- base::ListValue* pem_list = new base::ListValue;
- if (!ca_cert_pem.empty())
- pem_list->AppendString(ca_cert_pem);
- properties->SetWithoutPathExpansion(shill::kL2tpIpsecCaCertPemProperty,
- pem_list);
+ if (server_ca_cert_combobox_) {
+ std::string ca_cert_pem = GetServerCACertPEM();
+ base::ListValue* pem_list = new base::ListValue;
+ if (!ca_cert_pem.empty())
+ pem_list->AppendString(ca_cert_pem);
+ properties->SetWithoutPathExpansion(shill::kL2tpIpsecCaCertPemProperty,
+ pem_list);
+ }
SetUserCertProperties(client_cert::CONFIG_TYPE_IPSEC, properties);
if (!group_name.empty()) {
properties->SetStringWithoutPathExpansion(
@@ -856,12 +858,14 @@ void VPNConfigView::SetConfigProperties(
break;
}
case PROVIDER_TYPE_INDEX_OPEN_VPN: {
- std::string ca_cert_pem = GetServerCACertPEM();
- base::ListValue* pem_list = new base::ListValue;
- if (!ca_cert_pem.empty())
- pem_list->AppendString(ca_cert_pem);
- properties->SetWithoutPathExpansion(shill::kOpenVPNCaCertPemProperty,
- pem_list);
+ if (server_ca_cert_combobox_) {
+ std::string ca_cert_pem = GetServerCACertPEM();
+ base::ListValue* pem_list = new base::ListValue;
+ if (!ca_cert_pem.empty())
+ pem_list->AppendString(ca_cert_pem);
+ properties->SetWithoutPathExpansion(shill::kOpenVPNCaCertPemProperty,
+ pem_list);
+ }
SetUserCertProperties(client_cert::CONFIG_TYPE_OPENVPN, properties);
properties->SetStringWithoutPathExpansion(
shill::kOpenVPNUserProperty, GetUsername());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698