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

Side by Side Diff: net/android/cert_verify_result_android.cc

Issue 2209993003: Add missing using statements for JNI types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « mojo/android/system/core_impl.cc ('k') | net/android/dummy_spnego_authenticator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/android/cert_verify_result_android.h" 5 #include "net/android/cert_verify_result_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "jni/AndroidCertVerifyResult_jni.h" 9 #include "jni/AndroidCertVerifyResult_jni.h"
10 10
11 using base::android::AttachCurrentThread; 11 using base::android::AttachCurrentThread;
12 using base::android::JavaArrayOfByteArrayToStringVector; 12 using base::android::JavaArrayOfByteArrayToStringVector;
13 using base::android::ScopedJavaLocalRef;
13 14
14 namespace net { 15 namespace net {
15 namespace android { 16 namespace android {
16 17
17 void ExtractCertVerifyResult(jobject result, 18 void ExtractCertVerifyResult(jobject result,
18 CertVerifyStatusAndroid* status, 19 CertVerifyStatusAndroid* status,
19 bool* is_issued_by_known_root, 20 bool* is_issued_by_known_root,
20 std::vector<std::string>* verified_chain) { 21 std::vector<std::string>* verified_chain) {
21 JNIEnv* env = AttachCurrentThread(); 22 JNIEnv* env = AttachCurrentThread();
22 23
23 *status = static_cast<CertVerifyStatusAndroid>( 24 *status = static_cast<CertVerifyStatusAndroid>(
24 Java_AndroidCertVerifyResult_getStatus(env, result)); 25 Java_AndroidCertVerifyResult_getStatus(env, result));
25 26
26 *is_issued_by_known_root = 27 *is_issued_by_known_root =
27 Java_AndroidCertVerifyResult_isIssuedByKnownRoot(env, result); 28 Java_AndroidCertVerifyResult_isIssuedByKnownRoot(env, result);
28 29
29 ScopedJavaLocalRef<jobjectArray> chain_byte_array = 30 ScopedJavaLocalRef<jobjectArray> chain_byte_array =
30 Java_AndroidCertVerifyResult_getCertificateChainEncoded(env, result); 31 Java_AndroidCertVerifyResult_getCertificateChainEncoded(env, result);
31 JavaArrayOfByteArrayToStringVector( 32 JavaArrayOfByteArrayToStringVector(
32 env, chain_byte_array.obj(), verified_chain); 33 env, chain_byte_array.obj(), verified_chain);
33 } 34 }
34 35
35 } // namespace android 36 } // namespace android
36 } // namespace net 37 } // namespace net
OLDNEW
« no previous file with comments | « mojo/android/system/core_impl.cc ('k') | net/android/dummy_spnego_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698