Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: content/public/browser/client_certificate_delegate.h

Issue 2898573002: Refactor client cert private key handling. (Closed)
Patch Set: removed no longer needed forward declaration Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_PUBLIC_BROWSER_CLIENT_CERTIFICATE_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_CLIENT_CERTIFICATE_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_CLIENT_CERTIFICATE_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_CLIENT_CERTIFICATE_DELEGATE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 9
10 namespace net { 10 namespace net {
11 class SSLPrivateKey;
11 class X509Certificate; 12 class X509Certificate;
12 } 13 }
13 14
14 namespace content { 15 namespace content {
15 16
16 // A delegate interface for selecting a client certificate for use with a 17 // A delegate interface for selecting a client certificate for use with a
17 // network request. If the delegate is destroyed without calling 18 // network request. If the delegate is destroyed without calling
18 // ContinueWithCertificate, the certificate request will be aborted. 19 // ContinueWithCertificate, the certificate request will be aborted.
19 class ClientCertificateDelegate { 20 class ClientCertificateDelegate {
20 public: 21 public:
21 ClientCertificateDelegate() {} 22 ClientCertificateDelegate() {}
22 virtual ~ClientCertificateDelegate() {} 23 virtual ~ClientCertificateDelegate() {}
23 24
24 // Continue the request with |cert|. |cert| may be nullptr to continue without 25 // Continue the request with |cert| and matching |key|. |cert| may be nullptr
25 // supplying a certificate. This decision will be remembered for future 26 // to continue without supplying a certificate. This decision will be
26 // requests to the domain. 27 // remembered for future requests to the domain.
27 virtual void ContinueWithCertificate(net::X509Certificate* cert) = 0; 28 virtual void ContinueWithCertificate(
29 scoped_refptr<net::X509Certificate> cert,
30 scoped_refptr<net::SSLPrivateKey> key) = 0;
28 31
29 private: 32 private:
30 DISALLOW_COPY_AND_ASSIGN(ClientCertificateDelegate); 33 DISALLOW_COPY_AND_ASSIGN(ClientCertificateDelegate);
31 }; 34 };
32 35
33 } // namespace content 36 } // namespace content
34 37
35 #endif // CONTENT_PUBLIC_BROWSER_CLIENT_CERTIFICATE_DELEGATE_H_ 38 #endif // CONTENT_PUBLIC_BROWSER_CLIENT_CERTIFICATE_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/browser/ssl/ssl_client_auth_handler.cc ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698