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

Unified Diff: chrome/browser/ssl/ssl_client_auth_handler.h

Issue 2823038: Refactor SSLClientAuthHandler and certificate selection (Closed)
Patch Set: Rebase the patch Created 10 years, 5 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: chrome/browser/ssl/ssl_client_auth_handler.h
diff --git a/chrome/browser/ssl/ssl_client_auth_handler.h b/chrome/browser/ssl/ssl_client_auth_handler.h
index f63d4c948336452768e6fc50ba60f643d7edca2a..05148d51d9226523cfcfdf1eedb9b8c63ec068ed 100644
--- a/chrome/browser/ssl/ssl_client_auth_handler.h
+++ b/chrome/browser/ssl/ssl_client_auth_handler.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/ref_counted.h"
+#include "chrome/browser/chrome_thread.h"
#include "net/base/ssl_cert_request_info.h"
namespace net {
@@ -19,7 +20,8 @@ class URLRequest;
// It is self-owned and deletes itself when the UI reports the user selection or
// when the URLRequest is cancelled.
class SSLClientAuthHandler
- : public base::RefCountedThreadSafe<SSLClientAuthHandler> {
+ : public base::RefCountedThreadSafe<SSLClientAuthHandler,
+ ChromeThread::DeleteOnIOThread> {
public:
SSLClientAuthHandler(URLRequest* request,
net::SSLCertRequestInfo* cert_request_info);
@@ -38,15 +40,15 @@ class SSLClientAuthHandler
// be long after DoSelectCertificate returns, if the UI is modeless/async.)
void CertificateSelected(net::X509Certificate* cert);
+ // Returns the SSLCertRequestInfo for this handler.
+ net::SSLCertRequestInfo* cert_request_info() { return cert_request_info_; }
+
private:
- friend class base::RefCountedThreadSafe<SSLClientAuthHandler>;
+ friend class ChromeThread;
+ friend class DeleteTask<SSLClientAuthHandler>;
~SSLClientAuthHandler();
- // Asks the user for a cert.
- // Called on the UI thread.
- void DoSelectCertificate();
-
// Notifies that the user has selected a cert.
// Called on the IO thread.
void DoCertificateSelected(net::X509Certificate* cert);
« no previous file with comments | « chrome/browser/renderer_host/render_view_host_notification_task.h ('k') | chrome/browser/ssl/ssl_client_auth_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698