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

Side by Side Diff: chrome/browser/ssl/ssl_client_auth_handler.h

Issue 147233: Basic implentation of the client auth UI (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 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 CHROME_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_H
6 #define CHROME_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_H
7
8 #include "base/basictypes.h"
9 #include "base/ref_counted.h"
10 #include "net/base/ssl_cert_request_info.h"
11
12 namespace net {
13 class X509Certificate;
14 }
15 class MessageLoop;
16 class URLRequest;
17
18 // This class handles the approval and selection of a certificate for SSL client
19 // authentication by the user.
20 // It is self-owned and deletes itself when the UI reports the user selection or
21 // when the URLRequest is cancelled.
22 class SSLClientAuthHandler : public base::RefCounted<SSLClientAuthHandler> {
23 public:
24 SSLClientAuthHandler(URLRequest* request,
25 net::SSLCertRequestInfo* cert_request_info,
26 MessageLoop* io_loop,
27 MessageLoop* ui_loop);
28 ~SSLClientAuthHandler();
29
30 // Asks the user for a certificate and resumes the URL request with that
wtc 2009/06/26 23:03:52 Nit: "for" => "to select" because we already found
31 // certificate.
32 // Should only be called on the IO thread.
33 void SelectCertificate();
34
35 // Invoked when the request associated with this handler is cancelled.
36 // Should only be called on the IO thread.
37 void OnRequestCancelled();
38
39 private:
40 // Prompts the user for a cert.
41 // Called on the UI thread.
42 void AskUserForCertificate();
wtc 2009/06/26 23:03:52 You can just name this DoSelectCertificate -- we s
43
44 // Notifies that the user has selected a cert.
45 // Called on the IO thread.
46 void CertificateSelected(net::X509Certificate* cert);
47
48 // The URLRequest that triggered this client auth.
49 URLRequest* request_;
50
51 // The certs to choose from.
52 scoped_refptr<net::SSLCertRequestInfo> cert_request_info_;
53
54 MessageLoop* io_loop_;
55 MessageLoop* ui_loop_;
56
57 DISALLOW_COPY_AND_ASSIGN(SSLClientAuthHandler);
58 };
59
60 #endif // CHROME_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_H
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/resource_dispatcher_host.cc ('k') | chrome/browser/ssl/ssl_client_auth_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698