Using pre-existing constants instead of hard-coding
[chromium-blink-merge.git] / net / android / cert_verify_result_android.h
blob7027c3d7726dc1842133f528d6e98c5feda5e181
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.
5 #ifndef NET_ANDROID_CERT_VERIFY_RESULT_ANDROID_H_
6 #define NET_ANDROID_CERT_VERIFY_RESULT_ANDROID_H_
8 #include <jni.h>
10 #include <string>
11 #include <vector>
13 #include "base/basictypes.h"
15 namespace net {
17 namespace android {
19 enum CertVerifyStatusAndroid {
20 #define CERT_VERIFY_STATUS_ANDROID(label, value) VERIFY_ ## label = value,
21 #include "net/android/cert_verify_status_android_list.h"
22 #undef CERT_VERIFY_STATUS_ANDROID
25 // Extract parameters out of an AndroidCertVerifyResult object.
26 void ExtractCertVerifyResult(jobject result,
27 CertVerifyStatusAndroid* status,
28 bool* is_issued_by_known_root,
29 std::vector<std::string>* verified_chain);
31 // Register JNI methods.
32 bool RegisterCertVerifyResult(JNIEnv* env);
34 } // namespace android
36 } // namespace net
38 #endif // NET_ANDROID_CERT_VERIFY_RESULT_ANDROID_H_