Index: content/public/browser/client_certificate_delegate.h |
diff --git a/content/public/browser/client_certificate_delegate.h b/content/public/browser/client_certificate_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4614577dba8ff6501bfc1994089c589e2088f165 |
--- /dev/null |
+++ b/content/public/browser/client_certificate_delegate.h |
@@ -0,0 +1,34 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_PUBLIC_BROWSER_CLIENT_CERTIFICATE_DELEGATE_H_ |
+#define CONTENT_PUBLIC_BROWSER_CLIENT_CERTIFICATE_DELEGATE_H_ |
+ |
+namespace net { |
+class X509Certificate; |
+} |
+ |
+namespace content { |
+ |
+// A delegate interface for selecting a client certificate for use with a |
+// network request. |
+class ClientCertificateDelegate { |
+ public: |
+ virtual ~ClientCertificateDelegate() {} |
+ |
+ // Continue the request with |cert|. |cert| may be nullptr to continue without |
+ // supplying a certificate. This decision will be remembered for future |
+ // requests to the domain. |
+ // |
+ // TODO(davidben): Some calls to ContinueWithCertificate(nullptr) should be |
+ // CancelCertificateSelection. Switch them all as appropriate. |
+ virtual void ContinueWithCertificate(net::X509Certificate* cert) = 0; |
+ |
+ // Called to abort the request. |
+ virtual void CancelCertificateSelection() = 0; |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_PUBLIC_BROWSER_CLIENT_CERTIFICATE_DELEGATE_H_ |