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

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

Issue 780383002: Don't key client auth on HttpNetworkSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
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/ui/views/ssl_client_certificate_selector.h" 5 #include "chrome/browser/ui/views/ssl_client_certificate_selector.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/certificate_viewer.h" 10 #include "chrome/browser/certificate_viewer.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 void CertificateSelectorTableModel::SetObserver( 76 void CertificateSelectorTableModel::SetObserver(
77 ui::TableModelObserver* observer) { 77 ui::TableModelObserver* observer) {
78 } 78 }
79 79
80 /////////////////////////////////////////////////////////////////////////////// 80 ///////////////////////////////////////////////////////////////////////////////
81 // SSLClientCertificateSelector: 81 // SSLClientCertificateSelector:
82 82
83 SSLClientCertificateSelector::SSLClientCertificateSelector( 83 SSLClientCertificateSelector::SSLClientCertificateSelector(
84 content::WebContents* web_contents, 84 content::WebContents* web_contents,
85 const net::HttpNetworkSession* network_session,
86 const scoped_refptr<net::SSLCertRequestInfo>& cert_request_info, 85 const scoped_refptr<net::SSLCertRequestInfo>& cert_request_info,
87 const chrome::SelectCertificateCallback& callback) 86 const chrome::SelectCertificateCallback& callback)
88 : SSLClientAuthObserver(network_session, cert_request_info, callback), 87 : SSLClientAuthObserver(web_contents->GetBrowserContext(),
88 cert_request_info, callback),
89 model_(new CertificateSelectorTableModel(cert_request_info.get())), 89 model_(new CertificateSelectorTableModel(cert_request_info.get())),
90 web_contents_(web_contents), 90 web_contents_(web_contents),
91 table_(NULL), 91 table_(NULL),
92 view_cert_button_(NULL) { 92 view_cert_button_(NULL) {
93 DVLOG(1) << __FUNCTION__; 93 DVLOG(1) << __FUNCTION__;
94 } 94 }
95 95
96 SSLClientCertificateSelector::~SSLClientCertificateSelector() { 96 SSLClientCertificateSelector::~SSLClientCertificateSelector() {
97 table_->SetModel(NULL); 97 table_->SetModel(NULL);
98 } 98 }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 void SSLClientCertificateSelector::Unlocked(net::X509Certificate* cert) { 267 void SSLClientCertificateSelector::Unlocked(net::X509Certificate* cert) {
268 DVLOG(1) << __FUNCTION__; 268 DVLOG(1) << __FUNCTION__;
269 CertificateSelected(cert); 269 CertificateSelected(cert);
270 GetWidget()->Close(); 270 GetWidget()->Close();
271 } 271 }
272 272
273 namespace chrome { 273 namespace chrome {
274 274
275 void ShowSSLClientCertificateSelector( 275 void ShowSSLClientCertificateSelector(
276 content::WebContents* contents, 276 content::WebContents* contents,
277 const net::HttpNetworkSession* network_session,
278 net::SSLCertRequestInfo* cert_request_info, 277 net::SSLCertRequestInfo* cert_request_info,
279 const chrome::SelectCertificateCallback& callback) { 278 const chrome::SelectCertificateCallback& callback) {
280 DVLOG(1) << __FUNCTION__ << " " << contents; 279 DVLOG(1) << __FUNCTION__ << " " << contents;
281 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 280 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
282 (new SSLClientCertificateSelector( 281 (new SSLClientCertificateSelector(
283 contents, network_session, cert_request_info, callback))->Init(); 282 contents, cert_request_info, callback))->Init();
284 } 283 }
285 284
286 } // namespace chrome 285 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698