Commit deb838f0 authored by Peter Kotwicz's avatar Peter Kotwicz Committed by Commit Bot

Remove unused WebApkValidator#disableValidationUnsafe()

BUG=None

Change-Id: I03c770a9f06ebdb310cf1ace86cfc3b76b897e9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2345487Reviewed-by: default avatarPeter Conn <peconn@chromium.org>
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796423}
parent 03085930
......@@ -49,7 +49,6 @@ public class WebApkValidator {
private static byte[] sExpectedSignature;
private static byte[] sCommentSignedPublicKeyBytes;
private static PublicKey sCommentSignedPublicKey;
private static boolean sDisableValidation;
private static boolean sOverrideValidationForTesting;
/**
......@@ -178,8 +177,7 @@ public class WebApkValidator {
*/
@SuppressLint("PackageManagerGetSignatures")
public static boolean isValidWebApk(Context context, String webappPackageName) {
if ((sExpectedSignature == null || sCommentSignedPublicKeyBytes == null)
&& !sDisableValidation) {
if (sExpectedSignature == null || sCommentSignedPublicKeyBytes == null) {
Log.wtf(TAG,
"WebApk validation failure - expected signature not set."
+ "missing call to WebApkValidator.initWithBrowserHostSignature");
......@@ -199,7 +197,7 @@ public class WebApkValidator {
if (isNotWebApkQuick(packageInfo)) {
return false;
}
if (sDisableValidation || sOverrideValidationForTesting) {
if (sOverrideValidationForTesting) {
if (DEBUG) {
Log.d(TAG, "Ok! Looks like a WebApk (has start url) and validation is disabled.");
}
......@@ -416,14 +414,6 @@ public class WebApkValidator {
sOverrideValidationForTesting = true;
}
/**
* Disables all validation performed by this class. This should only be called when some other
* means of validating WebApks is already present and otherwise should never be called.
*/
public static void disableValidationUnsafe() {
sDisableValidation = true;
}
/**
* Lazy evaluate the creation of the Public Key as the KeyFactories may not yet be initialized.
* @return The decoded PublicKey or null
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment