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

Unified Diff: content/public/browser/client_certificate_delegate.h

Issue 859213006: Cancel client auth requests when not promptable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@client-auth-cancel-1
Patch Set: extension test Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698