OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/android/policy/policy_auditor.h" | 5 #include "chrome/browser/android/policy/policy_auditor.h" |
6 | 6 |
7 #include "content/public/browser/navigation_entry.h" | 7 #include "content/public/browser/navigation_entry.h" |
8 #include "content/public/browser/render_process_host.h" | 8 #include "content/public/browser/render_process_host.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 #include "content/public/common/ssl_status.h" | 10 #include "content/public/common/ssl_status.h" |
11 #include "jni/PolicyAuditor_jni.h" | 11 #include "jni/PolicyAuditor_jni.h" |
12 #include "net/cert/cert_status_flags.h" | 12 #include "net/cert/cert_status_flags.h" |
13 | 13 |
| 14 using base::android::JavaParamRef; |
| 15 |
14 int GetCertificateFailure(JNIEnv* env, | 16 int GetCertificateFailure(JNIEnv* env, |
15 const JavaParamRef<jclass>& obj, | 17 const JavaParamRef<jclass>& obj, |
16 const JavaParamRef<jobject>& java_web_contents) { | 18 const JavaParamRef<jobject>& java_web_contents) { |
17 // This function is similar to | 19 // This function is similar to |
18 // ToolbarModelImpl::GetSecurityLevelForWebContents, but has a custom mapping | 20 // ToolbarModelImpl::GetSecurityLevelForWebContents, but has a custom mapping |
19 // for policy auditing | 21 // for policy auditing |
20 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.policy | 22 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.policy |
21 // GENERATED_JAVA_PREFIX_TO_STRIP: CERTIFICATE_FAIL_ | 23 // GENERATED_JAVA_PREFIX_TO_STRIP: CERTIFICATE_FAIL_ |
22 enum CertificateFailure { | 24 enum CertificateFailure { |
23 NONE = 0, | 25 NONE = 0, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 return CERTIFICATE_FAIL_UNSPECIFIED; | 64 return CERTIFICATE_FAIL_UNSPECIFIED; |
63 } | 65 } |
64 } | 66 } |
65 } | 67 } |
66 return NONE; | 68 return NONE; |
67 } | 69 } |
68 | 70 |
69 bool RegisterPolicyAuditor(JNIEnv* env) { | 71 bool RegisterPolicyAuditor(JNIEnv* env) { |
70 return RegisterNativesImpl(env); | 72 return RegisterNativesImpl(env); |
71 } | 73 } |
OLD | NEW |