| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/ssl/ssl_client_auth_handler.h" | 5 #include "content/browser/ssl/ssl_client_auth_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 8 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
| 9 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" | 9 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" |
| 10 #include "content/browser/ssl/ssl_client_auth_notification_details.h" | 10 #include "content/browser/ssl/ssl_client_auth_notification_details.h" |
| 11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
| 12 #include "content/public/browser/content_browser_client.h" | 12 #include "content/public/browser/content_browser_client.h" |
| 13 #include "content/public/browser/notification_service.h" | 13 #include "content/public/browser/notification_service.h" |
| 14 #include "net/base/x509_certificate.h" | 14 #include "net/base/x509_certificate.h" |
| 15 #include "net/http/http_transaction_factory.h" | 15 #include "net/http/http_transaction_factory.h" |
| 16 #include "net/url_request/url_request.h" | 16 #include "net/url_request/url_request.h" |
| 17 #include "net/url_request/url_request_context.h" | 17 #include "net/url_request/url_request_context.h" |
| 18 | 18 |
| 19 using content::BrowserThread; |
| 20 |
| 19 SSLClientAuthHandler::SSLClientAuthHandler( | 21 SSLClientAuthHandler::SSLClientAuthHandler( |
| 20 net::URLRequest* request, | 22 net::URLRequest* request, |
| 21 net::SSLCertRequestInfo* cert_request_info) | 23 net::SSLCertRequestInfo* cert_request_info) |
| 22 : request_(request), | 24 : request_(request), |
| 23 http_network_session_( | 25 http_network_session_( |
| 24 request_->context()->http_transaction_factory()->GetSession()), | 26 request_->context()->http_transaction_factory()->GetSession()), |
| 25 cert_request_info_(cert_request_info) { | 27 cert_request_info_(cert_request_info) { |
| 26 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 28 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 27 } | 29 } |
| 28 | 30 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 notification_registrar_.Add( | 152 notification_registrar_.Add( |
| 151 this, content::NOTIFICATION_SSL_CLIENT_AUTH_CERT_SELECTED, | 153 this, content::NOTIFICATION_SSL_CLIENT_AUTH_CERT_SELECTED, |
| 152 content::Source<net::HttpNetworkSession>( | 154 content::Source<net::HttpNetworkSession>( |
| 153 handler_->http_network_session())); | 155 handler_->http_network_session())); |
| 154 } | 156 } |
| 155 | 157 |
| 156 void SSLClientAuthObserver::StopObserving() { | 158 void SSLClientAuthObserver::StopObserving() { |
| 157 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 159 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 158 notification_registrar_.RemoveAll(); | 160 notification_registrar_.RemoveAll(); |
| 159 } | 161 } |
| OLD | NEW |