OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_PUBLIC_BROWSER_CLIENT_CERTIFICATE_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_CLIENT_CERTIFICATE_DELEGATE_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 |
| 10 namespace net { |
| 11 class X509Certificate; |
| 12 } |
| 13 |
| 14 namespace content { |
| 15 |
| 16 // A delegate interface for selecting a client certificate for use with a |
| 17 // network request. |
| 18 class ClientCertificateDelegate { |
| 19 public: |
| 20 ClientCertificateDelegate() {} |
| 21 virtual ~ClientCertificateDelegate() {} |
| 22 |
| 23 // Continue the request with |cert|. |cert| may be nullptr to continue without |
| 24 // supplying a certificate. This decision will be remembered for future |
| 25 // requests to the domain. |
| 26 // |
| 27 // TODO(davidben): Some calls to ContinueWithCertificate(nullptr) should be |
| 28 // CancelCertificateSelection. Switch them all as appropriate. |
| 29 virtual void ContinueWithCertificate(net::X509Certificate* cert) = 0; |
| 30 |
| 31 // Called to abort the request. |
| 32 virtual void CancelCertificateSelection() = 0; |
| 33 |
| 34 private: |
| 35 DISALLOW_COPY_AND_ASSIGN(ClientCertificateDelegate); |
| 36 }; |
| 37 |
| 38 } // namespace content |
| 39 |
| 40 #endif // CONTENT_PUBLIC_BROWSER_CLIENT_CERTIFICATE_DELEGATE_H_ |
OLD | NEW |