Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/policy/PolicyAuditor.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/policy/PolicyAuditor.java b/chrome/android/java/src/org/chromium/chrome/browser/policy/PolicyAuditor.java |
| index 17646b26b646f226904a85b313098a7812686757..86d074cc26a6c62eeb7206cf396c5e6d39c72243 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/policy/PolicyAuditor.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/policy/PolicyAuditor.java |
| @@ -5,9 +5,13 @@ |
| package org.chromium.chrome.browser.policy; |
| import android.content.Context; |
| +import android.support.annotation.IntDef; |
| import org.chromium.content_public.browser.WebContents; |
| +import java.lang.annotation.Retention; |
| +import java.lang.annotation.RetentionPolicy; |
| + |
| /** |
| * Base class for policy auditors providing an empty implementation. |
| */ |
| @@ -23,13 +27,35 @@ public class PolicyAuditor { |
| AUTOFILL_SELECTED |
| } |
| + @Retention(RetentionPolicy.SOURCE) |
| + @IntDef({ |
| + CERTIFICATE_NO_FAILURE, |
| + CERTIFICATE_FAIL_UNSPECIFIED, |
| + CERTIFICATE_FAIL_UNTRUSTED, |
| + CERTIFICATE_FAIL_REVOKED, |
| + CERTIFICATE_FAIL_NOT_YET_VALID, |
| + CERTIFICATE_FAIL_EXPIRED, |
| + CERTIFICATE_FAIL_UNABLE_TO_CHECK_REVOCATION_STATUS |
| + }) |
| + protected @interface CertificateFailure {} |
| + protected static final int CERTIFICATE_NO_FAILURE = 0; |
| + protected static final int CERTIFICATE_FAIL_UNSPECIFIED = 1; |
| + protected static final int CERTIFICATE_FAIL_UNTRUSTED = 2; |
| + protected static final int CERTIFICATE_FAIL_REVOKED = 3; |
| + protected static final int CERTIFICATE_FAIL_NOT_YET_VALID = 4; |
| + protected static final int CERTIFICATE_FAIL_EXPIRED = 5; |
| + protected static final int CERTIFICATE_FAIL_UNABLE_TO_CHECK_REVOCATION_STATUS = 6; |
| + |
| /** |
| * Make it non-obvious to accidentally instantiate this outside of ChromeApplication. |
| */ |
| protected PolicyAuditor() {} |
| - public void notifyAuditEvent(final Context context, final AuditEvent event, final String url, |
| - final String message) {} |
| + public void notifyAuditEvent(Context context, AuditEvent event, String url, String message) {} |
| + |
| + public void notifyCertificateFailure( |
| + @CertificateFailure int certificateFailure, Context context) {} |
| - public void notifyCertificateFailure(final WebContents webContents, final Context context) {} |
| -} |
| + @CertificateFailure |
| + public static native int nativeGetCertificateFailure(WebContents webContents); |
|
Yaron
2016/04/28 15:13:59
not the prettiest API but it does the trick..
|
| +} |