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

Side by Side Diff: chrome/browser/chromeos/options/wifi_config_view.cc

Issue 410113002: Fix WiFi config view for previously configured client cert. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chromeos/network/client_cert_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/options/wifi_config_view.h" 5 #include "chrome/browser/chromeos/options/wifi_config_view.h"
6 6
7 #include "ash/system/chromeos/network/network_connect.h" 7 #include "ash/system/chromeos/network/network_connect.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 server_ca_cert_combobox_->SetSelectedIndex(0); 1288 server_ca_cert_combobox_->SetSelectedIndex(0);
1289 } 1289 }
1290 } 1290 }
1291 } 1291 }
1292 1292
1293 // User certificate. 1293 // User certificate.
1294 if (UserCertActive()) { 1294 if (UserCertActive()) {
1295 std::string eap_cert_id; 1295 std::string eap_cert_id;
1296 properties.GetStringWithoutPathExpansion( 1296 properties.GetStringWithoutPathExpansion(
1297 shill::kEapCertIdProperty, &eap_cert_id); 1297 shill::kEapCertIdProperty, &eap_cert_id);
1298 if (!eap_cert_id.empty()) { 1298 std::string pkcs11_id = client_cert::GetPkcs11IdFromEapCertId(eap_cert_id);
1299 if (!pkcs11_id.empty()) {
1299 int cert_index = 1300 int cert_index =
1300 CertLibrary::Get()->GetUserCertIndexByPkcs11Id(eap_cert_id); 1301 CertLibrary::Get()->GetUserCertIndexByPkcs11Id(pkcs11_id);
1301 if (cert_index >= 0) 1302 if (cert_index >= 0)
1302 user_cert_combobox_->SetSelectedIndex(cert_index); 1303 user_cert_combobox_->SetSelectedIndex(cert_index);
1303 } 1304 }
1304 } 1305 }
1305 1306
1306 // Identity is always active. 1307 // Identity is always active.
1307 std::string eap_identity; 1308 std::string eap_identity;
1308 properties.GetStringWithoutPathExpansion( 1309 properties.GetStringWithoutPathExpansion(
1309 shill::kEapIdentityProperty, &eap_identity); 1310 shill::kEapIdentityProperty, &eap_identity);
1310 identity_textfield_->SetText(base::UTF8ToUTF16(eap_identity)); 1311 identity_textfield_->SetText(base::UTF8ToUTF16(eap_identity));
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 void WifiConfigView::ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data, 1376 void WifiConfigView::ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data,
1376 const NetworkState* network, 1377 const NetworkState* network,
1377 const std::string& key) { 1378 const std::string& key) {
1378 std::string onc_tag = network->type() == shill::kTypeEthernet 1379 std::string onc_tag = network->type() == shill::kTypeEthernet
1379 ? ::onc::ethernet::kEAP 1380 ? ::onc::ethernet::kEAP
1380 : ::onc::wifi::kEAP; 1381 : ::onc::wifi::kEAP;
1381 ParseUIProperty(property_ui_data, network, onc_tag + '.' + key); 1382 ParseUIProperty(property_ui_data, network, onc_tag + '.' + key);
1382 } 1383 }
1383 1384
1384 } // namespace chromeos 1385 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chromeos/network/client_cert_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698