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

Side by Side Diff: chrome/browser/ui/android/ssl_client_certificate_request.h

Issue 12374020: Add Android support for SSL client authentication to the browser layer. (Closed) Base URL: http://git.chromium.org/chromium/src.git@client-cert-test
Patch Set: nits Created 7 years, 9 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
OLDNEW
(Empty)
1 // Copyright (c) 2013 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_UI_ANDROID_SSL_CLIENT_CERTIFICATE_REQUEST_H_
6 #define CHROME_BROWSER_UI_ANDROID_SSL_CLIENT_CERTIFICATE_REQUEST_H_
7
8 #include <jni.h>
9
10 #include "base/android/scoped_java_ref.h"
11 #include "base/basictypes.h"
12 #include "base/callback.h"
13 #include "base/memory/ref_counted.h"
14 #include "base/string_piece.h"
15
16 namespace net {
17 class SSLCertRequestInfo;
18 } // namespace net
19
20 namespace chrome {
21 namespace android {
22
23 // Type for a callback that will receive the results of certificate
24 // selection.
25 // The first parameter is the encoded client certificate chain, where
26 // each item is a DER-encoded X.509 certificate.
27 // The second parameter is a local JNI reference to the platform's
28 // PrivateKey object for this certificate.
29 // Note that the callback will be called with NULL parameters
30 // to indicate that no certificate was selected, or that an error
31 // occured (e.g. if the user failed to unlock access to the
32 // credential storage).
33 typedef base::Callback<void(const std::vector<base::StringPiece>*,
Ryan Sleevi 2013/03/06 23:24:22 On second glance, I'm not at all sure how this is
digit1 2013/03/07 15:38:20 Actually this section of the head if obsolete, the
34 jobject)>
35 CertificateSelectionCallback;
36
37 // Launch an asynchronous client certificate system activity to let
38 // the user select a client certificate.
39 //
40 // |cert_request_info| holds the client certificate request details.
41 // |cert_callback| is a callback that will be called later with the
42 // results of the request, later on the UI thread.
43 //
44 // Due to platform APIs, note the following limitations:
45 // - It's not possible to cancel a request once it has been started.
46 // - Each request will launch a system activity which pauses the UI
47 // thread.
48 // - There is no way to distinguish between different error cases.
49 void StartClientCertificateRequest(
Ryan Sleevi 2013/03/06 23:24:22 maybe I'm blind, but why does this need to be in t
digit1 2013/03/07 15:38:20 It doesn't need to be here, it's just that I forgo
50 const net::SSLCertRequestInfo* cert_request_info,
51 const CertificateSelectionCallback& cert_callback);
52
53 // Register JNI methods.
54 bool RegisterSSLClientCertificateRequestAndroid(JNIEnv* env);
55
56 } // namespace android
57 } // namespace chrome
58
59 #endif // CHROME_BROWSER_UI_ANDROID_SSL_CLIENT_CERTIFICATE_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698