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

Side by Side Diff: chrome/browser/ssl/ssl_add_certificate_android.cc

Issue 11266008: Fix certificate and keychain installation on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: move some code to chrome/browser/ssl/ Created 8 years, 1 month 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) 2012 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 #include "chrome/browser/ssl/ssl_add_certificate.h"
6
7 #include "net/android/network_library.h"
8
9 // Special case for Android here for several reasons:
10 //
11 // - The SSLAddCertHandler implementation currently only supports
12 // CERTIFICATE_TYPE_X509_USER_CERT, but not other types, like
13 // CERTIFICATE_TYPE_PKCS12_ARCHIVE which are required on this
14 // platform.
15 //
16 // - Besides, SSLAddCertHandler tries to parse the certificate
17 // by calling net::CertDatabase::CheckUserCert() which is not
18 // implemented on Android, mainly because there is no API
19 // provided by the system to do that properly.
20 //
21 // - The Android CertInstaller activity will check the certificate file
22 // and display a toast (small fading dialog) to the user if it is
23 // not valid, so the UI performed by SSLAddCertHandler would
24 // be redundant.
25 void chrome::SSLAddCertificate(
darin (slow to review) 2012/11/26 19:53:43 nit: ditto about namespace
digit1 2012/11/26 21:41:35 Done.
26 net::URLRequest* /* request */,
27 net::CertificateType cert_type,
28 const void* cert_data,
29 size_t cert_size,
30 int /* render_process_id */,
31 int /* render_view_id */) {
32 if (cert_size > 0) {
33 // This launches a new activity which will run in a different process.
34 // It handles all user interaction, so no need to do anything in the
35 // browser UI thread here.
36 net::android::StoreCertificate(cert_type, cert_data, cert_size);
37 }
38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698