| OLD | NEW |
| 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_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/ssl/ssl_tab_helper.h" | 8 #include "chrome/browser/ssl/ssl_tab_helper.h" |
| 9 #include "chrome/browser/tab_contents/tab_util.h" | 9 #include "chrome/browser/tab_contents/tab_util.h" |
| 10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| 11 #include "content/public/browser/resource_request_info.h" | 11 #include "content/public/browser/resource_request_info.h" |
| 12 #include "content/public/browser/web_contents.h" | 12 #include "content/public/browser/web_contents.h" |
| 13 #include "net/base/cert_database.h" | |
| 14 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
| 15 #include "net/base/x509_certificate.h" | 14 #include "net/cert/cert_database.h" |
| 15 #include "net/cert/x509_certificate.h" |
| 16 #include "net/url_request/url_request.h" | 16 #include "net/url_request/url_request.h" |
| 17 | 17 |
| 18 using content::BrowserThread; | 18 using content::BrowserThread; |
| 19 using content::WebContents; | 19 using content::WebContents; |
| 20 | 20 |
| 21 SSLAddCertHandler::SSLAddCertHandler(net::URLRequest* request, | 21 SSLAddCertHandler::SSLAddCertHandler(net::URLRequest* request, |
| 22 net::X509Certificate* cert, | 22 net::X509Certificate* cert, |
| 23 int render_process_host_id, | 23 int render_process_host_id, |
| 24 int render_view_id) | 24 int render_view_id) |
| 25 : cert_(cert), | 25 : cert_(cert), |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 SSLTabHelper* ssl_tab_helper = SSLTabHelper::FromWebContents(tab); | 101 SSLTabHelper* ssl_tab_helper = SSLTabHelper::FromWebContents(tab); |
| 102 if (add_cert) { | 102 if (add_cert) { |
| 103 if (cert_error == net::OK) { | 103 if (cert_error == net::OK) { |
| 104 ssl_tab_helper->OnAddClientCertificateSuccess(this); | 104 ssl_tab_helper->OnAddClientCertificateSuccess(this); |
| 105 } else { | 105 } else { |
| 106 ssl_tab_helper->OnAddClientCertificateError(this, cert_error); | 106 ssl_tab_helper->OnAddClientCertificateError(this, cert_error); |
| 107 } | 107 } |
| 108 } | 108 } |
| 109 ssl_tab_helper->OnAddClientCertificateFinished(this); | 109 ssl_tab_helper->OnAddClientCertificateFinished(this); |
| 110 } | 110 } |
| OLD | NEW |