| 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 #ifndef CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_H_ |
| 6 #define CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_H_ | 6 #define CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
| 16 #include "net/cert/x509_certificate.h" | |
| 17 #include "net/ssl/ssl_cert_request_info.h" | 16 #include "net/ssl/ssl_cert_request_info.h" |
| 18 | 17 |
| 19 namespace net { | 18 namespace net { |
| 20 class ClientCertStore; | 19 class ClientCertStore; |
| 21 class URLRequest; | 20 class URLRequest; |
| 22 class X509Certificate; | 21 class X509Certificate; |
| 23 } // namespace net | 22 } // namespace net |
| 24 | 23 |
| 25 namespace content { | 24 namespace content { |
| 26 | 25 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 67 |
| 69 // Called to abort the request associated with |handler|. This is static to | 68 // Called to abort the request associated with |handler|. This is static to |
| 70 // avoid deleting |handler| while it is on the stack. | 69 // avoid deleting |handler| while it is on the stack. |
| 71 static void CancelCertificateSelection( | 70 static void CancelCertificateSelection( |
| 72 const base::WeakPtr<SSLClientAuthHandler>& handler); | 71 const base::WeakPtr<SSLClientAuthHandler>& handler); |
| 73 | 72 |
| 74 private: | 73 private: |
| 75 class Core; | 74 class Core; |
| 76 | 75 |
| 77 // Called when |core_| is done retrieving the cert list. | 76 // Called when |core_| is done retrieving the cert list. |
| 78 void DidGetClientCerts(net::CertificateList client_certs); | 77 void DidGetClientCerts(); |
| 79 | 78 |
| 80 // A reference-counted core so the ClientCertStore may outlive | 79 // A reference-counted core so the ClientCertStore may outlive |
| 81 // SSLClientAuthHandler if the handler is destroyed while an operation on the | 80 // SSLClientAuthHandler if the handler is destroyed while an operation on the |
| 82 // ClientCertStore is in progress. | 81 // ClientCertStore is in progress. |
| 83 scoped_refptr<Core> core_; | 82 scoped_refptr<Core> core_; |
| 84 | 83 |
| 85 // The net::URLRequest that triggered this client auth. | 84 // The net::URLRequest that triggered this client auth. |
| 86 net::URLRequest* request_; | 85 net::URLRequest* request_; |
| 87 | 86 |
| 88 // The certs to choose from. | 87 // The certs to choose from. |
| 89 scoped_refptr<net::SSLCertRequestInfo> cert_request_info_; | 88 scoped_refptr<net::SSLCertRequestInfo> cert_request_info_; |
| 90 | 89 |
| 91 // The delegate to call back with the result. | 90 // The delegate to call back with the result. |
| 92 Delegate* delegate_; | 91 Delegate* delegate_; |
| 93 | 92 |
| 94 base::WeakPtrFactory<SSLClientAuthHandler> weak_factory_; | 93 base::WeakPtrFactory<SSLClientAuthHandler> weak_factory_; |
| 95 | 94 |
| 96 DISALLOW_COPY_AND_ASSIGN(SSLClientAuthHandler); | 95 DISALLOW_COPY_AND_ASSIGN(SSLClientAuthHandler); |
| 97 }; | 96 }; |
| 98 | 97 |
| 99 } // namespace content | 98 } // namespace content |
| 100 | 99 |
| 101 #endif // CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_H_ | 100 #endif // CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_H_ |
| OLD | NEW |