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

Side by Side Diff: chrome/browser/ui/gtk/ssl_client_certificate_selector.cc

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
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/ssl/ssl_client_certificate_selector.h" 5 #include "chrome/browser/ssl/ssl_client_certificate_selector.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 // Auto-select the first cert. 235 // Auto-select the first cert.
236 gtk_combo_box_set_active(GTK_COMBO_BOX(cert_combo_box_), 0); 236 gtk_combo_box_set_active(GTK_COMBO_BOX(cert_combo_box_), 0);
237 } 237 }
238 238
239 net::X509Certificate* SSLClientCertificateSelector::GetSelectedCert() { 239 net::X509Certificate* SSLClientCertificateSelector::GetSelectedCert() {
240 int selected = gtk_combo_box_get_active(GTK_COMBO_BOX(cert_combo_box_)); 240 int selected = gtk_combo_box_get_active(GTK_COMBO_BOX(cert_combo_box_));
241 if (selected >= 0 && 241 if (selected >= 0 &&
242 selected < static_cast<int>( 242 selected < static_cast<int>(
243 cert_request_info()->client_certs.size())) 243 cert_request_info()->client_certs.size()))
244 return cert_request_info()->client_certs[selected]; 244 return cert_request_info()->client_certs[selected].get();
245 return NULL; 245 return NULL;
246 } 246 }
247 247
248 // static 248 // static
249 std::string SSLClientCertificateSelector::FormatComboBoxText( 249 std::string SSLClientCertificateSelector::FormatComboBoxText(
250 net::X509Certificate::OSCertHandle cert, const std::string& nickname) { 250 net::X509Certificate::OSCertHandle cert, const std::string& nickname) {
251 std::string rv(nickname); 251 std::string rv(nickname);
252 rv += " ["; 252 rv += " [";
253 rv += x509_certificate_model::GetSerialNumberHexified(cert, std::string()); 253 rv += x509_certificate_model::GetSerialNumberHexified(cert, std::string());
254 rv += ']'; 254 rv += ']';
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 content::WebContents* contents, 389 content::WebContents* contents,
390 const net::HttpNetworkSession* network_session, 390 const net::HttpNetworkSession* network_session,
391 net::SSLCertRequestInfo* cert_request_info, 391 net::SSLCertRequestInfo* cert_request_info,
392 const base::Callback<void(net::X509Certificate*)>& callback) { 392 const base::Callback<void(net::X509Certificate*)>& callback) {
393 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 393 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
394 (new SSLClientCertificateSelector( 394 (new SSLClientCertificateSelector(
395 contents, network_session, cert_request_info, callback))->Show(); 395 contents, network_session, cert_request_info, callback))->Show();
396 } 396 }
397 397
398 } // namespace chrome 398 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/infobars/extension_infobar_gtk.cc ('k') | chrome/browser/ui/login/login_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698