Commit 1582b199 authored by Peter E Conn's avatar Peter E Conn Committed by Chromium LUCI CQ

🍱 Fix up OriginVerifierStatics.

Add another required method and make the class public.

Change-Id: Iede75f4e2dba149632d929b1b4aad544f2bc3621
Bug: 1164866
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2629269Reviewed-by: default avatarElla Ge <eirage@chromium.org>
Commit-Queue: Peter Conn <peconn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843540}
parent 6f4848bf
...@@ -7,6 +7,7 @@ package org.chromium.chrome.browser.browserservices.verification; ...@@ -7,6 +7,7 @@ package org.chromium.chrome.browser.browserservices.verification;
import org.chromium.components.embedder_support.util.Origin; import org.chromium.components.embedder_support.util.Origin;
import androidx.annotation.VisibleForTesting; import androidx.annotation.VisibleForTesting;
import androidx.browser.customtabs.CustomTabsService;
/** /**
* Adds a layer of indirection to calls to static methods on {@link OriginVerifier}. This allows us * Adds a layer of indirection to calls to static methods on {@link OriginVerifier}. This allows us
...@@ -15,7 +16,7 @@ import androidx.annotation.VisibleForTesting; ...@@ -15,7 +16,7 @@ import androidx.annotation.VisibleForTesting;
* *
* This should be temporary, see https://crbug.com/1164866 * This should be temporary, see https://crbug.com/1164866
*/ */
class OriginVerifierStatics { public class OriginVerifierStatics {
/** Calls {@link OriginVerifier#clearCachedVerificationsForTesting}. */ /** Calls {@link OriginVerifier#clearCachedVerificationsForTesting}. */
@VisibleForTesting @VisibleForTesting
public static void clearCachedVerificationsForTesting() { public static void clearCachedVerificationsForTesting() {
...@@ -27,4 +28,10 @@ class OriginVerifierStatics { ...@@ -27,4 +28,10 @@ class OriginVerifierStatics {
String packageName, Origin origin, int relationship) { String packageName, Origin origin, int relationship) {
OriginVerifier.addVerificationOverride(packageName, origin, relationship); OriginVerifier.addVerificationOverride(packageName, origin, relationship);
} }
/** Calls {@link OriginVerifier#wasPreviouslyVerified(String, Origin, int)}. */
public static boolean wasPreviouslyVerified(
String packageName, Origin origin, @CustomTabsService.Relation int relation) {
return OriginVerifier.wasPreviouslyVerified(packageName, origin, relation);
}
} }
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