tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit e1c7f82240bc979c762d31aa575f5e5e0856991f
parent 9d28f53547ad66c885323b92d09213c33d39df1f
Author: Johannes Salas Schmidt <joschmidt@mozilla.com>
Date:   Wed,  7 Jan 2026 20:15:09 +0000

Bug 2008901 - Add breach alert fields to Login data class r=bdk,android-reviewers,sfamisa

Adds `timeOfLastBreach` and `timeLastBreachAlertDismissed` fields to the
Login data class introduced with application-services PR #7127.

Differential Revision: https://phabricator.services.mozilla.com/D278093

Diffstat:
Mmobile/android/android-components/components/concept/storage/src/main/java/mozilla/components/concept/storage/LoginsStorage.kt | 12++++++++++++
Mmobile/android/android-components/components/service/sync-logins/src/main/java/mozilla/components/service/sync/logins/Types.kt | 4++++
2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/mobile/android/android-components/components/concept/storage/src/main/java/mozilla/components/concept/storage/LoginsStorage.kt b/mobile/android/android-components/components/concept/storage/src/main/java/mozilla/components/concept/storage/LoginsStorage.kt @@ -63,6 +63,18 @@ data class Login( * Time of last password change in milliseconds from the unix epoch. */ val timePasswordChanged: Long = 0L, + /** + * Time of last breach in milliseconds from the unix epoch. + * A breach indicates that the login's origin has been found in a known data breach. + * This timestamp represents when the breach affecting this login's origin was last detected. + * Note: Breach information is ingested on Desktop. + */ + val timeOfLastBreach: Long? = null, + /** + * Time of last breach alert dismissal in milliseconds from the unix epoch. + * This field is set on Desktop when a user discards the warning message of the breach. + */ + val timeLastBreachAlertDismissed: Long? = null, ) { /** * Converts [Login] into a [LoginEntry]. diff --git a/mobile/android/android-components/components/service/sync-logins/src/main/java/mozilla/components/service/sync/logins/Types.kt b/mobile/android/android-components/components/service/sync-logins/src/main/java/mozilla/components/service/sync/logins/Types.kt @@ -25,6 +25,8 @@ fun mozilla.appservices.logins.Login.toLogin() = Login( timeCreated = timeCreated, timeLastUsed = timeLastUsed, timePasswordChanged = timePasswordChanged, + timeOfLastBreach = timeOfLastBreach, + timeLastBreachAlertDismissed = timeLastBreachAlertDismissed, ) /** @@ -56,4 +58,6 @@ fun Login.toLogin() = mozilla.appservices.logins.Login( passwordField = passwordField, username = username, password = password, + timeOfLastBreach = timeOfLastBreach, + timeLastBreachAlertDismissed = timeLastBreachAlertDismissed, )