Commit e085030a authored by Irina Fedorova's avatar Irina Fedorova Committed by Commit Bot

Add onWeakCredentialsChanged observer

This CL adds OnWeakCredentialsChanged to the observer interfase in
InsecureCredentialsManager.

Bug: 1119752
Change-Id: I6619f06d06cf99113ddb05b4e12a69110b531460
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2391122
Commit-Queue: Irina Fedorova <irfedorova@google.com>
Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: default avatarVasilii Sukhanov <vasilii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#804771}
parent a667f75e
......@@ -471,6 +471,13 @@ void PasswordCheckDelegate::OnCompromisedCredentialsChanged(
}
}
void PasswordCheckDelegate::OnWeakCredentialsChanged(
InsecureCredentialsView credentials) {
// TODO(crbug.com/1119752): Implement this method after adding
// OnWeakCredentialsChanged to PasswordsPrivateEventRouter.
NOTIMPLEMENTED();
}
void PasswordCheckDelegate::OnStateChanged(State state) {
if (state == State::kIdle && std::exchange(is_check_running_, false)) {
// When the service transitions from running into idle it has finished a
......
......@@ -96,6 +96,13 @@ class PasswordCheckDelegate
password_manager::InsecureCredentialsManager::CredentialsView credentials)
override;
// password_manager::InsecureCredentialsManager::Observer:
// Invokes PasswordsPrivateEventRouter::OnWeakCredentialsChanged if a valid
// pointer can be obtained.
void OnWeakCredentialsChanged(
password_manager::InsecureCredentialsManager::CredentialsView credentials)
override;
// password_manager::BulkLeakCheckService::Observer:
void OnStateChanged(
password_manager::BulkLeakCheckService::State state) override;
......
......@@ -107,13 +107,14 @@ class InsecureCredentialsManager
using CredentialsView = base::span<const CredentialWithPassword>;
// Observer interface. Clients can implement this to get notified about
// changes to the list of compromised credentials. Clients can register and
// de-register themselves, and are expected to do so before the provider gets
// out of scope.
// changes to the list of compromised and weak credentials. Clients can
// register and de-register themselves, and are expected to do so before the
// provider gets out of scope.
class Observer : public base::CheckedObserver {
public:
virtual void OnCompromisedCredentialsChanged(
CredentialsView credentials) = 0;
virtual void OnWeakCredentialsChanged(CredentialsView credentials) {}
};
InsecureCredentialsManager(
......
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