0

Remove remaining functions in the interface.

Internal reference was removed in https://crrev.com/i/7648757

OBSOLETE_HISTOGRAMS=No longer logged because URLs are checked through
the new GMSCore Safe Browsing API.

Bug: 40935425
Change-Id: I3ab1e5783395c63586bd4c5163541161027004bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5837639
Commit-Queue: Xinghui Lu <xinghuilu@chromium.org>
Reviewed-by: Daniel Rubery <drubery@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1352852}
This commit is contained in:
Xinghui Lu
2024-09-09 17:22:45 +00:00
committed by Chromium LUCI CQ
parent fe8f35b03b
commit e5700c49b7
3 changed files with 1 additions and 43 deletions
components/safe_browsing/android
java
src
org
chromium
components
safe_browsing_api_handler_util.h
tools/metrics/histograms/metadata/others

@ -9,16 +9,8 @@ package org.chromium.components.safe_browsing;
* SafeBrowsingApiBridge}.
*/
public interface SafetyNetApiHandler {
/** Observer to be notified when the SafetyNetApiHandler determines the verdict for a url. */
/** Observer to be notified when the SafetyNetApiHandler determines the verify apps result. */
interface Observer {
// TODO(crbug.com/40935425): Remove this function once internal reference is removed.
// Note: |checkDelta| is the time the remote call took in microseconds.
default void onUrlCheckDone(
long callbackId,
@SafeBrowsingResult int resultStatus,
String metadata,
long checkDelta) {}
void onVerifyAppsEnabledDone(long callbackId, @VerifyAppsResult int result);
}
@ -32,14 +24,6 @@ public interface SafetyNetApiHandler {
*/
boolean init(Observer observer);
/**
* TODO(crbug.com/40935425): Remove this function once internal reference is removed.
*
* <p>Start a URI-lookup to determine if it matches one of the specified threats. This is called
* on every URL resource Chrome loads, on the same sequence as |init|.
*/
default void startUriLookup(long callbackId, String uri, int[] threatsOfInterest) {}
/**
* Start a check to determine if a uri is in an allowlist. If true, password protection service
* will consider the uri to be safe.

@ -13,16 +13,6 @@
namespace safe_browsing {
// TODO(crbug.com/40935425): Remove this enum once internal reference is
// removed. These match what SafetyNetApiHandler.java uses for |resultStatus|
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.safe_browsing
// GENERATED_JAVA_CLASS_NAME_OVERRIDE: SafeBrowsingResult
enum class SafetyNetRemoteCallResultStatus {
INTERNAL_ERROR = -1,
SUCCESS = 0,
TIMEOUT = 1,
};
// Threat types as per the Java code.
// This must match those in SafeBrowsingThreat.java in GMS's SafetyNet API.
enum class SafetyNetJavaThreatType {

@ -8094,22 +8094,6 @@ chromium-metrics-reviews@google.com.
</summary>
</histogram>
<histogram name="SB2.RemoteCall.InternalErrorStatusCode2"
enum="GooglePlayServicesConnectionResult" expires_after="never">
<!-- expires-never: This tracks the result of connecting to GmsCore for
Safe Browsing lookups, which is critical for security. -->
<owner>vakh@chromium.org</owner>
<owner>chrome-counter-abuse-alerts@google.com</owner>
<summary>
The status code provided by GmsCore if it is unable to respond to a URL
check request due to incorrect initialization, not being ready, etc. Logged
on each URL check that hits the internal error condition. The total number
of these should add up to the INTERNAL_ERROR reports under
SB2.RemoteCall.Result.
</summary>
</histogram>
<histogram name="SBIRS.DiscardedIncident" enum="IncidentType"
expires_after="never">
<!-- expires-never: This tracks health of the incident reporting feature and