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 "chrome/browser/ssl/ssl_add_cert_handler.h" | 5 #include "chrome/browser/ssl/ssl_add_cert_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" | 8 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" |
9 #include "chrome/browser/tab_contents/tab_util.h" | 9 #include "chrome/browser/tab_contents/tab_util.h" |
10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
11 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 11 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
12 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" | 12 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" |
13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
14 #include "net/base/cert_database.h" | 14 #include "net/base/cert_database.h" |
15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
16 #include "net/base/x509_certificate.h" | 16 #include "net/base/x509_certificate.h" |
17 #include "net/url_request/url_request.h" | 17 #include "net/url_request/url_request.h" |
18 | 18 |
| 19 using content::BrowserThread; |
| 20 |
19 SSLAddCertHandler::SSLAddCertHandler(net::URLRequest* request, | 21 SSLAddCertHandler::SSLAddCertHandler(net::URLRequest* request, |
20 net::X509Certificate* cert, | 22 net::X509Certificate* cert, |
21 int render_process_host_id, | 23 int render_process_host_id, |
22 int render_view_id) | 24 int render_view_id) |
23 : cert_(cert), | 25 : cert_(cert), |
24 render_process_host_id_(render_process_host_id), | 26 render_process_host_id_(render_process_host_id), |
25 render_view_id_(render_view_id) { | 27 render_view_id_(render_view_id) { |
26 ResourceDispatcherHostRequestInfo* info = | 28 ResourceDispatcherHostRequestInfo* info = |
27 ResourceDispatcherHost::InfoForRequest(request); | 29 ResourceDispatcherHost::InfoForRequest(request); |
28 network_request_id_ = info->request_id(); | 30 network_request_id_ = info->request_id(); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 TabContentsWrapper::GetCurrentWrapperForContents(tab); | 106 TabContentsWrapper::GetCurrentWrapperForContents(tab); |
105 if (add_cert) { | 107 if (add_cert) { |
106 if (cert_error == net::OK) { | 108 if (cert_error == net::OK) { |
107 wrapper->ssl_helper()->OnAddClientCertificateSuccess(this); | 109 wrapper->ssl_helper()->OnAddClientCertificateSuccess(this); |
108 } else { | 110 } else { |
109 wrapper->ssl_helper()->OnAddClientCertificateError(this, cert_error); | 111 wrapper->ssl_helper()->OnAddClientCertificateError(this, cert_error); |
110 } | 112 } |
111 } | 113 } |
112 wrapper->ssl_helper()->OnAddClientCertificateFinished(this); | 114 wrapper->ssl_helper()->OnAddClientCertificateFinished(this); |
113 } | 115 } |
OLD | NEW |