OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_cert_error_handler.h" | 5 #include "chrome/browser/ssl/ssl_cert_error_handler.h" |
6 | 6 |
7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
8 #include "chrome/browser/ssl/ssl_manager.h" | 8 #include "chrome/browser/ssl/ssl_manager.h" |
9 #include "chrome/browser/ssl/ssl_policy.h" | 9 #include "chrome/browser/ssl/ssl_policy.h" |
10 #include "net/base/x509_certificate.h" | 10 #include "net/base/x509_certificate.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 main_frame_origin), | 21 main_frame_origin), |
22 cert_error_(cert_error) { | 22 cert_error_(cert_error) { |
23 DCHECK(request == resource_dispatcher_host_->GetURLRequest(request_id_)); | 23 DCHECK(request == resource_dispatcher_host_->GetURLRequest(request_id_)); |
24 | 24 |
25 // We cannot use the request->ssl_info(), it's not been initialized yet, so | 25 // We cannot use the request->ssl_info(), it's not been initialized yet, so |
26 // we have to set the fields manually. | 26 // we have to set the fields manually. |
27 ssl_info_.cert = cert; | 27 ssl_info_.cert = cert; |
28 ssl_info_.SetCertError(cert_error); | 28 ssl_info_.SetCertError(cert_error); |
29 } | 29 } |
30 | 30 |
| 31 SSLCertErrorHandler* SSLCertErrorHandler::AsSSLCertErrorHandler() { |
| 32 return this; |
| 33 } |
| 34 |
31 void SSLCertErrorHandler::OnDispatchFailed() { | 35 void SSLCertErrorHandler::OnDispatchFailed() { |
32 CancelRequest(); | 36 CancelRequest(); |
33 } | 37 } |
34 | 38 |
35 void SSLCertErrorHandler::OnDispatched() { | 39 void SSLCertErrorHandler::OnDispatched() { |
36 manager_->policy()->OnCertError(this); | 40 manager_->policy()->OnCertError(this); |
37 } | 41 } |
38 | 42 |
39 SSLCertErrorHandler::~SSLCertErrorHandler() {} | 43 SSLCertErrorHandler::~SSLCertErrorHandler() {} |
OLD | NEW |